Skip to content

Commit

Permalink
Fix deployment scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumevincent committed Oct 25, 2019
1 parent e9f9aac commit ff1b574
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
7 changes: 2 additions & 5 deletions bin/deploy_node_modules
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ set -o pipefail
set -o nounset

function push_packages_on_npm {
grep --fixed-strings --line-regexp --silent "//registry.npmjs.org/:_authToken=$NPM_TOKEN" ~/.npmrc
if [ $? == 1 ]
then
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
fi
touch ~/.npmrc
grep --fixed-strings --line-regexp --silent "//registry.npmjs.org/:_authToken=$NPM_TOKEN" ~/.npmrc || echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
projects="lesspass lesspass-crypto lesspass-entropy lesspass-fingerprint lesspass-pure lesspass-render-password"
for project in ${projects}
do
Expand Down
1 change: 1 addition & 0 deletions bin/deploy_web_extensions
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ set -o pipefail
set -o nounset

function release_web_extensions {
yarn install
yarn workspace lesspass-web-extension run release
VERSION=$(grep -Po '(?<="version": ")[^"]*' package.json)
echo "Download sources on https://github.com/lesspass/lesspass/releases/tag/${VERSION}"
Expand Down
9 changes: 7 additions & 2 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@ function check_repository_is_clean {
git remote update
git add .
git status
git diff-index --quiet HEAD --;
git diff-index --quiet HEAD
if [ $? == 1 ]
then
print_error "Git repository not clean. Aborting."
exit 1
fi
if [ $(git rev-parse HEAD) != $(git rev-parse @{u}) ]
then
print_error "Git branch diverged. Aborting."
exit 1
fi
}

function check_branch_is_master {
Expand Down Expand Up @@ -116,7 +121,7 @@ function build_web_extensions {

function build_mobile_app {
pushd mobile/android/
./gradlew assembleRelease
./gradlew bundleRelease
popd
}

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"vue-polyglot-utils": "^0.1.1",
"vue-template-compiler": "^2.6.10",
"walk": "^2.3.14",
"web-ext": "^3.2.0",
"web-ext-submit": "^3.1.0",
"webpack": "^4.35.3",
"webpack-cli": "^3.3.6",
Expand Down

0 comments on commit ff1b574

Please sign in to comment.