1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-04 13:44:00 +01:00
bitwarden-browser/apps/cli/scripts/brew-update.ps1

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
699 B
PowerShell
Raw Permalink Normal View History

2018-07-27 15:45:20 +02:00
param (
[Parameter(Mandatory=$true)]
[string] $version
)
# Dependencies:
# 1. brew cask install powershell
2018-08-09 05:08:22 +02:00
# 2. Environment variables for HOMEBREW_GITHUB_USER and HOMEBREW_GITHUB_API_TOKEN set.
2018-07-27 15:45:20 +02:00
#
# To run:
# pwsh ./brew-update.ps1 -version 1.1.0
2018-08-09 05:08:22 +02:00
# Cleaning up
cd $("$(brew --repository)" + "/Library/Taps/homebrew/homebrew-core/Formula")
git checkout master
git reset --hard origin/master
git push $env:HOMEBREW_GITHUB_USER master
git branch -D $("bitwarden-cli-" + $version)
git push $env:HOMEBREW_GITHUB_USER --delete $("bitwarden-cli-" + $version)
# Bump
2018-07-27 15:45:20 +02:00
$url = 'https://registry.npmjs.org/@bitwarden/cli/-/cli-' + $version + '.tgz';
2018-07-27 15:56:44 +02:00
brew bump-formula-pr --url="$url" bitwarden-cli