mirror of
https://github.com/bitwarden/desktop.git
synced 2024-12-28 17:18:24 +01:00
cask update git commands
This commit is contained in:
parent
8b5f8e9576
commit
2ae9dfd891
@ -1,14 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# dependencies:
|
||||
# brew install jq
|
||||
# Dependencies:
|
||||
# 1. brew install jq
|
||||
# 2. fork of homebrew-cask repo setup.
|
||||
# see https://github.com/caskroom/homebrew-cask/blob/master/CONTRIBUTING.md#getting-set-up-to-contribute
|
||||
|
||||
FORK_GITHUB_USER="kspearrin"
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
PWD_DIR="$(pwd)"
|
||||
ROOT_DIR="$DIR/.."
|
||||
DIST_DIR="$ROOT_DIR/dist"
|
||||
CASK_DIR="$ROOT_DIR/stores/homebrew-cask"
|
||||
DIST_CASK_DIR="$DIST_DIR/homebrew-cask"
|
||||
GIT_CASKS_DIR=""$(brew --repository)"/Library/Taps/caskroom/homebrew-cask/Casks"
|
||||
|
||||
if [ -d "$DIST_CASK_DIR" ]
|
||||
then
|
||||
@ -28,3 +33,18 @@ RB_NEW="$DIST_CASK_DIR/bitwarden.rb.new"
|
||||
|
||||
sed -e 's/__version__/'"$SRC_PACAKGE_VERSION"'/g; s/__checksum__/'"$CHECKSUM"'/g; s/__checkpoint__/'"$CHECKPOINT"'/g' $RB > $RB_NEW
|
||||
mv -f $RB_NEW $RB
|
||||
|
||||
cd $GIT_CASKS_DIR
|
||||
git checkout master
|
||||
git pull
|
||||
git reset --hard origin/master
|
||||
git push $FORK_GITHUB_USER master
|
||||
git push -d $FORK_GITHUB_USER bitwarden || true
|
||||
git branch -D bitwarden || true
|
||||
git checkout -b bitwarden
|
||||
GIT_CASKS_RB="$GIT_CASKS_DIR/bitwarden.rb"
|
||||
cp $RB $GIT_CASKS_RB
|
||||
git add $GIT_CASKS_RB
|
||||
git commit -m "Update Bitwarden.app to v$SRC_PACAKGE_VERSION"
|
||||
git push $FORK_GITHUB_USER bitwarden
|
||||
cd $PWD_DIR
|
||||
|
@ -1,13 +1,13 @@
|
||||
cask 'bitwarden' do
|
||||
version '__version__'
|
||||
sha256 '__checksum__'
|
||||
|
||||
# github.com/bitwarden/desktop was verified as official when first introduced to the cask
|
||||
url "https://github.com/bitwarden/desktop/releases/download/v#{version}/bitwarden-#{version}-mac.zip"
|
||||
appcast 'https://github.com/bitwarden/desktop/releases.atom',
|
||||
checkpoint: '__checkpoint__'
|
||||
name 'Bitwarden'
|
||||
homepage 'https://bitwarden.com/'
|
||||
|
||||
app 'Bitwarden.app'
|
||||
end
|
||||
version '__version__'
|
||||
sha256 '__checksum__'
|
||||
|
||||
# github.com/bitwarden/desktop was verified as official when first introduced to the cask
|
||||
url "https://github.com/bitwarden/desktop/releases/download/v#{version}/bitwarden-#{version}-mac.zip"
|
||||
appcast 'https://github.com/bitwarden/desktop/releases.atom',
|
||||
checkpoint: '__checkpoint__'
|
||||
name 'Bitwarden'
|
||||
homepage 'https://bitwarden.com/'
|
||||
|
||||
app 'Bitwarden.app'
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user