@@ -7,6 +7,7 @@ on: | |||||
- completed | - completed | ||||
jobs: | jobs: | ||||
publish: | publish: | ||||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |||||
runs-on: ubuntu-18.04 | runs-on: ubuntu-18.04 | ||||
steps: | steps: | ||||
- uses: actions/checkout@v2 | - uses: actions/checkout@v2 | ||||
@@ -16,6 +17,7 @@ jobs: | |||||
- run: | | - run: | | ||||
cd cli | cd cli | ||||
./deploy | ./deploy | ||||
continue-on-error: true | |||||
env: | env: | ||||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |
@@ -16,10 +16,8 @@ jobs: | |||||
node-version: "14" | node-version: "14" | ||||
registry-url: "https://registry.npmjs.org" | registry-url: "https://registry.npmjs.org" | ||||
- run: yarn install | - run: yarn install | ||||
- run: yarn workspace lesspass-crypto run build | |||||
- run: | | |||||
cd packages/lesspass-crypto | |||||
yarn publish --non-interactive | |||||
- run: yarn workspace lesspass-crypto build | |||||
- run: yarn workspace lesspass-crypto publish --non-interactive | |||||
continue-on-error: true | continue-on-error: true | ||||
env: | env: | ||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
@@ -16,9 +16,7 @@ jobs: | |||||
node-version: "14" | node-version: "14" | ||||
registry-url: "https://registry.npmjs.org" | registry-url: "https://registry.npmjs.org" | ||||
- run: yarn install | - run: yarn install | ||||
- run: | | |||||
cd packages/lesspass-entropy | |||||
yarn publish --non-interactive | |||||
- run: yarn workspace lesspass-entropy publish --non-interactive | |||||
continue-on-error: true | continue-on-error: true | ||||
env: | env: | ||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
@@ -16,9 +16,7 @@ jobs: | |||||
node-version: "14" | node-version: "14" | ||||
registry-url: "https://registry.npmjs.org" | registry-url: "https://registry.npmjs.org" | ||||
- run: yarn install | - run: yarn install | ||||
- run: | | |||||
cd packages/lesspass-fingerprint | |||||
yarn publish --non-interactive | |||||
- run: yarn workspace lesspass-fingerprint publish --non-interactive | |||||
continue-on-error: true | continue-on-error: true | ||||
env: | env: | ||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
@@ -16,11 +16,9 @@ jobs: | |||||
node-version: "14" | node-version: "14" | ||||
registry-url: "https://registry.npmjs.org" | registry-url: "https://registry.npmjs.org" | ||||
- run: yarn install | - run: yarn install | ||||
- run: yarn workspace lesspass-crypto run build | |||||
- run: yarn workspace lesspass-pure run build | |||||
- run: | | |||||
cd packages/lesspass-pure | |||||
yarn publish --non-interactive | |||||
- run: yarn workspace lesspass-crypto build | |||||
- run: yarn workspace lesspass-pure build | |||||
- run: yarn workspace lesspass-pure publish --non-interactive | |||||
continue-on-error: true | continue-on-error: true | ||||
env: | env: | ||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
@@ -16,9 +16,7 @@ jobs: | |||||
node-version: "14" | node-version: "14" | ||||
registry-url: "https://registry.npmjs.org" | registry-url: "https://registry.npmjs.org" | ||||
- run: yarn install | - run: yarn install | ||||
- run: | | |||||
cd packages/lesspass-render-password | |||||
yarn publish --non-interactive | |||||
- run: yarn workspace lesspass-render-password publish --non-interactive | |||||
continue-on-error: true | continue-on-error: true | ||||
env: | env: | ||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
@@ -15,4 +15,4 @@ jobs: | |||||
with: | with: | ||||
node-version: "14" | node-version: "14" | ||||
- run: yarn install | - run: yarn install | ||||
- run: yarn workspace lesspass-render-password run test | |||||
- run: yarn workspace lesspass-render-password test |
@@ -12,10 +12,10 @@ jobs: | |||||
with: | with: | ||||
node-version: "14" | node-version: "14" | ||||
- run: yarn install | - run: yarn install | ||||
- run: yarn workspace lesspass-crypto run build | |||||
- run: yarn workspace lesspass-pure run build | |||||
- run: yarn workspace lesspass-web-extension run build | |||||
- run: yarn workspace lesspass-web-extension run release | |||||
- run: yarn workspace lesspass-crypto build | |||||
- run: yarn workspace lesspass-pure build | |||||
- run: yarn workspace lesspass-web-extension build | |||||
- run: yarn workspace lesspass-web-extension release | |||||
continue-on-error: true | continue-on-error: true | ||||
env: | env: | ||||
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }} | WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }} | ||||
@@ -0,0 +1,93 @@ | |||||
#!/usr/bin/env bash | |||||
RED='\033[0;31m' | |||||
GREEN='\033[0;32m' | |||||
NOCOLOR='\033[0m' | |||||
function echo_red { | |||||
echo -e "${RED}$1${NOCOLOR}" | |||||
} | |||||
function echo_green { | |||||
echo -e "${GREEN}$1${NOCOLOR}" | |||||
} | |||||
function check_current_directory_is_root { | |||||
if [ ! -f README.md ]; then | |||||
echo_red "You seems to be in the wrong directory" | |||||
echo_red "Execute this script from the root of lesspass with ./bin/${0##*/}" | |||||
exit 1 | |||||
fi | |||||
} | |||||
function check_repository_is_clean { | |||||
git remote update | |||||
git add . | |||||
git status | |||||
git diff-index --quiet HEAD | |||||
if [ $? == 1 ] | |||||
then | |||||
echo_red "Git repository not clean. Aborting." | |||||
exit 1 | |||||
fi | |||||
if [ $(git rev-parse HEAD) != $(git rev-parse @{u}) ] | |||||
then | |||||
echo_red "Git branch diverged. Aborting." | |||||
exit 1 | |||||
fi | |||||
} | |||||
function check_branch_is_main { | |||||
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) | |||||
if [ $BRANCH_NAME != "main" ] | |||||
then | |||||
echo_red "Current branch is not main. Aborting." | |||||
exit 1 | |||||
fi | |||||
} | |||||
function check_usage { | |||||
is_invalid=false | |||||
package="${1}" | |||||
if [ "${package}" != "web-extension" ] && [ "${package}" != "site" ] | |||||
then | |||||
echo_red "Error: package is invalid. (web-extension or site)." | |||||
is_invalid=true | |||||
fi | |||||
bump_type="${2}" | |||||
if [ "${bump_type}" != "--major" ] && [ "${bump_type}" != "--minor" ] && [ "${bump_type}" != "--patch" ] | |||||
then | |||||
echo_red "Error: No bump type specified (--major, --minor or --patch)." | |||||
is_invalid=true | |||||
fi | |||||
if [ "$is_invalid" = true ] | |||||
then | |||||
echo_green "Example: ./bin/${0##*/} web-extension --patch" | |||||
echo_green "Example: ./bin/${0##*/} site --patch" | |||||
exit 1 | |||||
fi | |||||
} | |||||
set +o errexit | |||||
package="${1:-}" | |||||
bump_type="${2:-}" | |||||
check_usage ${package} ${bump_type} | |||||
check_branch_is_main | |||||
check_current_directory_is_root | |||||
check_repository_is_clean | |||||
set -o errexit | |||||
set -o pipefail | |||||
set -o nounset | |||||
current_version=$( grep -m1 version packages/lesspass-${package}/package.json | cut -d '"' -f4 ) | |||||
echo "Current lesspass-${package} version is ${current_version}" | |||||
yarn config set version-tag-prefix "${package}-v" | |||||
yarn config set version-git-message "${package}-v%s" | |||||
yarn workspace lesspass-${package} version ${bump_type} | |||||
yarn config set version-tag-prefix "v" | |||||
yarn config set version-git-message "v%s" | |||||
new_version=$( grep -m1 version packages/lesspass-${package}/package.json | cut -d '"' -f4 ) | |||||
echo "New lesspass-${package} version is ${new_version}" | |||||
echo_green "git push --tags origin main" |
@@ -12,8 +12,8 @@ To rebuild the web extension, you need node, yarn and md5sum to check the md5 su | |||||
Tested with: | Tested with: | ||||
* node version 14.16.0 | |||||
* yarn version 1.22.5 | |||||
* node version 16.10.0 | |||||
* yarn version 1.22.11 | |||||
* md5sum (GNU coreutils) version 8.32 | * md5sum (GNU coreutils) version 8.32 | ||||
## unzip source {sha256}.zip | ## unzip source {sha256}.zip | ||||
@@ -23,9 +23,8 @@ Tested with: | |||||
## Reproduce lesspass.min.js and dist folder with sources | ## Reproduce lesspass.min.js and dist folder with sources | ||||
cd packages/lesspass-pure | |||||
yarn install | yarn install | ||||
yarn run build | |||||
cd ../../ | |||||
yarn workspace lesspass-crypto build | |||||
yarn workspace lesspass-pure build | |||||
find packages/lesspass-web-extension/extension/dist/ -type f -exec md5sum {} \; | find packages/lesspass-web-extension/extension/dist/ -type f -exec md5sum {} \; | ||||
find packages/lesspass-pure/dist -type f -exec md5sum {} \; | find packages/lesspass-pure/dist -type f -exec md5sum {} \; |
@@ -1,7 +1,7 @@ | |||||
{ | { | ||||
"name": "lesspass-web-extension", | "name": "lesspass-web-extension", | ||||
"description": "LessPass web extension", | "description": "LessPass web extension", | ||||
"version": "9.5.0", | |||||
"version": "9.6.2", | |||||
"license": "GPL-3.0", | "license": "GPL-3.0", | ||||
"author": "Guillaume Vincent <guillaume@oslab.fr>", | "author": "Guillaume Vincent <guillaume@oslab.fr>", | ||||
"scripts": { | "scripts": { | ||||