mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
cask update git commands
This commit is contained in:
@@ -1,14 +1,19 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# dependencies:
|
# Dependencies:
|
||||||
# brew install jq
|
# 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 )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
PWD_DIR="$(pwd)"
|
||||||
ROOT_DIR="$DIR/.."
|
ROOT_DIR="$DIR/.."
|
||||||
DIST_DIR="$ROOT_DIR/dist"
|
DIST_DIR="$ROOT_DIR/dist"
|
||||||
CASK_DIR="$ROOT_DIR/stores/homebrew-cask"
|
CASK_DIR="$ROOT_DIR/stores/homebrew-cask"
|
||||||
DIST_CASK_DIR="$DIST_DIR/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" ]
|
if [ -d "$DIST_CASK_DIR" ]
|
||||||
then
|
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
|
sed -e 's/__version__/'"$SRC_PACAKGE_VERSION"'/g; s/__checksum__/'"$CHECKSUM"'/g; s/__checkpoint__/'"$CHECKPOINT"'/g' $RB > $RB_NEW
|
||||||
mv -f $RB_NEW $RB
|
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
|
cask 'bitwarden' do
|
||||||
version '__version__'
|
version '__version__'
|
||||||
sha256 '__checksum__'
|
sha256 '__checksum__'
|
||||||
|
|
||||||
# github.com/bitwarden/desktop was verified as official when first introduced to the cask
|
# 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"
|
url "https://github.com/bitwarden/desktop/releases/download/v#{version}/bitwarden-#{version}-mac.zip"
|
||||||
appcast 'https://github.com/bitwarden/desktop/releases.atom',
|
appcast 'https://github.com/bitwarden/desktop/releases.atom',
|
||||||
checkpoint: '__checkpoint__'
|
checkpoint: '__checkpoint__'
|
||||||
name 'Bitwarden'
|
name 'Bitwarden'
|
||||||
homepage 'https://bitwarden.com/'
|
homepage 'https://bitwarden.com/'
|
||||||
|
|
||||||
app 'Bitwarden.app'
|
app 'Bitwarden.app'
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user