ソースを参照

Start using the same version number for everything

* Deploy automatically on npm all required packages on tag
 * Create a script to tag automatically and change the version number everywhere
 * Bump all versions numbers to 8.0.0
pull/426/head
Guillaume Vincent 5年前
コミット
dd2e8373fc
14個のファイルの変更164行の追加15行の削除
  1. +76
    -3
      .travis.yml
  2. +76
    -0
      bin/tag
  3. +1
    -1
      cli/lesspass/version.py
  4. +1
    -1
      mobile/package.json
  5. +1
    -1
      package.json
  6. +1
    -1
      packages/lesspass-crypto/package.json
  7. +1
    -1
      packages/lesspass-entropy/package.json
  8. +1
    -1
      packages/lesspass-fingerprint/package.json
  9. +1
    -1
      packages/lesspass-profiles/package.json
  10. +1
    -1
      packages/lesspass-pure/package.json
  11. +1
    -1
      packages/lesspass-render-password/package.json
  12. +1
    -1
      packages/lesspass-web-component/package.json
  13. +1
    -1
      packages/lesspass-web-extension/package.json
  14. +1
    -1
      packages/lesspass-web-site/package.json

+ 76
- 3
.travis.yml ファイルの表示

@@ -77,9 +77,82 @@ jobs:
secure: AOCdqmMdtzmxZXnnMM4ToA80y1PftTVoPsFi7D9RglfneRruRocfI+HQ1Y2m3wUkdGEKVrzkHudiOVMLpeuiMerz9JzQNX/MoujjTvq0h24pnXC+Y2JLNgqxQNuKttgBYP9yMhdgo0Si25KqRLTbmGNZLVnN1hXKV206alNmRWqsZeI/Yxje2FDgRnVTsAtXM+R2g/SvM5r/zVnFiogT/gbQ1Voz+kUo7c15o3Sp3D9+WL38P9Sk3tIVl7RA8o1yd7actDVezPhQPddSu+o+3poxUfrX9LtnibJiuWvqBRdQ2Pjwc7ZSjNJ/zPXntCu8hvdEVzCAXbVFfkhsk1xEDGrEne1hyRJuRX3F9o+SgkuKz53mSg1Wxw7tK6fmnyNG+EMU+oeIKGzNd4Ta/Dk9MzmrymeQgFsZSSFIlwi0ecJ7N+3f0UYTlMR788Q7JGXLsqHfY473rI1M5cpC24l88Pibsdjzf66sanlsZtzHN/51CZzuLLHwTt714CV2bVsffdp3UqaJ+pbhdLXYtrLColOg5Ua3el+t999pVr0r/V/gSqRKKVZqgbUwd9ajYTqYXDDt0+/+9c7ynhfH4hMLsafAZNhf74KBIbL7C30A/DfptiHlBP/5TWvOpzc+AyxWt8v1nnrEK/1vAGLGAaYkXKqmazb/9KlxkKDqDMC9ZQc=
on:
tags: true
all_branches: true
condition: $TRAVIS_TAG =~ ^cli.*$

branch: master
- stage: deploy
language: node_js
name: Deploy lesspass-crypto
node_js:
- lts/*
script: skip
before_deploy: cd packages/lesspass-crypto
deploy:
provider: npm
email: guillaume@oslab.fr
api_key:
secure: rD1rs7QEA7IX8erpnJStx2AKhS8DpzvFxCA/jw/t9cx40Hk29jTVq1h22Sr6Gitm169cH9/sFzZEqera64w/sC7tsLimf/3aQhx8ia0y8taNxVw6nQTRYhvJazhOEnPEN0hZV8cW12yAUWNjjU19xokJsmbaT9ICVy7LNoRhRubpPO58ICkn8A6fBaz49i+Q/WXAdzdpH5nvu0ffz5Vm2QXD5BC6MZcBn3NQX8sDftUK1lqUNuSJIppTR6cUuZW+RluuiajssxYT7LX5BUgW4vTgf1CcPJ5AlI2JLeytphOc7xEwJBk72vO9eLXQZ8CiSwHCYcz9QGDbPke1xfmlqBwjN/FaCLSk7fi1zEMLbDy0K8b26KUqlOaulPX2hjWsBzfX1TykrusqDxYZ72tIWe2GHPsLGQPEkmhUHlUSPaIMDkYIPydLcvLwS8YObThShCvG6AVmSR3v/25SM3pfb98AtLuKLieTq5kQFOog1HRqLjDZ4CdXFhxzLfoQb9+tXYC/cKsyD4GqVL6CQlfERhKUDMwSu284/6g6pqdVvZ7rzE7oiXgyO9PM+T9vA/j4UeNTahANbSx28AQrWa3n5EQHNOHMSAxv4rnpyDYUTUBrlTKYAUTHSvenKgBr9BKnGjJ4Oa+1jMpjgzw+BJT8smhJTVSQr5XFQoXiAUK2nzg=
on:
tags: true
branch: master
- stage: deploy
language: node_js
name: Deploy lesspass-entropy
node_js:
- lts/*
script: skip
before_deploy: cd packages/lesspass-entropy
deploy:
provider: npm
email: guillaume@oslab.fr
api_key:
secure: rD1rs7QEA7IX8erpnJStx2AKhS8DpzvFxCA/jw/t9cx40Hk29jTVq1h22Sr6Gitm169cH9/sFzZEqera64w/sC7tsLimf/3aQhx8ia0y8taNxVw6nQTRYhvJazhOEnPEN0hZV8cW12yAUWNjjU19xokJsmbaT9ICVy7LNoRhRubpPO58ICkn8A6fBaz49i+Q/WXAdzdpH5nvu0ffz5Vm2QXD5BC6MZcBn3NQX8sDftUK1lqUNuSJIppTR6cUuZW+RluuiajssxYT7LX5BUgW4vTgf1CcPJ5AlI2JLeytphOc7xEwJBk72vO9eLXQZ8CiSwHCYcz9QGDbPke1xfmlqBwjN/FaCLSk7fi1zEMLbDy0K8b26KUqlOaulPX2hjWsBzfX1TykrusqDxYZ72tIWe2GHPsLGQPEkmhUHlUSPaIMDkYIPydLcvLwS8YObThShCvG6AVmSR3v/25SM3pfb98AtLuKLieTq5kQFOog1HRqLjDZ4CdXFhxzLfoQb9+tXYC/cKsyD4GqVL6CQlfERhKUDMwSu284/6g6pqdVvZ7rzE7oiXgyO9PM+T9vA/j4UeNTahANbSx28AQrWa3n5EQHNOHMSAxv4rnpyDYUTUBrlTKYAUTHSvenKgBr9BKnGjJ4Oa+1jMpjgzw+BJT8smhJTVSQr5XFQoXiAUK2nzg=
on:
tags: true
branch: master
- stage: deploy
language: node_js
name: Deploy lesspass-fingerprint
node_js:
- lts/*
script: skip
before_deploy: cd packages/lesspass-fingerprint
deploy:
provider: npm
email: guillaume@oslab.fr
api_key:
secure: rD1rs7QEA7IX8erpnJStx2AKhS8DpzvFxCA/jw/t9cx40Hk29jTVq1h22Sr6Gitm169cH9/sFzZEqera64w/sC7tsLimf/3aQhx8ia0y8taNxVw6nQTRYhvJazhOEnPEN0hZV8cW12yAUWNjjU19xokJsmbaT9ICVy7LNoRhRubpPO58ICkn8A6fBaz49i+Q/WXAdzdpH5nvu0ffz5Vm2QXD5BC6MZcBn3NQX8sDftUK1lqUNuSJIppTR6cUuZW+RluuiajssxYT7LX5BUgW4vTgf1CcPJ5AlI2JLeytphOc7xEwJBk72vO9eLXQZ8CiSwHCYcz9QGDbPke1xfmlqBwjN/FaCLSk7fi1zEMLbDy0K8b26KUqlOaulPX2hjWsBzfX1TykrusqDxYZ72tIWe2GHPsLGQPEkmhUHlUSPaIMDkYIPydLcvLwS8YObThShCvG6AVmSR3v/25SM3pfb98AtLuKLieTq5kQFOog1HRqLjDZ4CdXFhxzLfoQb9+tXYC/cKsyD4GqVL6CQlfERhKUDMwSu284/6g6pqdVvZ7rzE7oiXgyO9PM+T9vA/j4UeNTahANbSx28AQrWa3n5EQHNOHMSAxv4rnpyDYUTUBrlTKYAUTHSvenKgBr9BKnGjJ4Oa+1jMpjgzw+BJT8smhJTVSQr5XFQoXiAUK2nzg=
on:
tags: true
branch: master
- stage: deploy
language: node_js
name: Deploy lesspass-pure
node_js:
- lts/*
script: skip
before_deploy: cd packages/lesspass-pure
deploy:
provider: npm
email: guillaume@oslab.fr
api_key:
secure: rD1rs7QEA7IX8erpnJStx2AKhS8DpzvFxCA/jw/t9cx40Hk29jTVq1h22Sr6Gitm169cH9/sFzZEqera64w/sC7tsLimf/3aQhx8ia0y8taNxVw6nQTRYhvJazhOEnPEN0hZV8cW12yAUWNjjU19xokJsmbaT9ICVy7LNoRhRubpPO58ICkn8A6fBaz49i+Q/WXAdzdpH5nvu0ffz5Vm2QXD5BC6MZcBn3NQX8sDftUK1lqUNuSJIppTR6cUuZW+RluuiajssxYT7LX5BUgW4vTgf1CcPJ5AlI2JLeytphOc7xEwJBk72vO9eLXQZ8CiSwHCYcz9QGDbPke1xfmlqBwjN/FaCLSk7fi1zEMLbDy0K8b26KUqlOaulPX2hjWsBzfX1TykrusqDxYZ72tIWe2GHPsLGQPEkmhUHlUSPaIMDkYIPydLcvLwS8YObThShCvG6AVmSR3v/25SM3pfb98AtLuKLieTq5kQFOog1HRqLjDZ4CdXFhxzLfoQb9+tXYC/cKsyD4GqVL6CQlfERhKUDMwSu284/6g6pqdVvZ7rzE7oiXgyO9PM+T9vA/j4UeNTahANbSx28AQrWa3n5EQHNOHMSAxv4rnpyDYUTUBrlTKYAUTHSvenKgBr9BKnGjJ4Oa+1jMpjgzw+BJT8smhJTVSQr5XFQoXiAUK2nzg=
on:
tags: true
branch: master
- stage: deploy
language: node_js
name: Deploy lesspass-render-password
node_js:
- lts/*
script: skip
before_deploy: cd packages/lesspass-render-password
deploy:
provider: npm
email: guillaume@oslab.fr
api_key:
secure: rD1rs7QEA7IX8erpnJStx2AKhS8DpzvFxCA/jw/t9cx40Hk29jTVq1h22Sr6Gitm169cH9/sFzZEqera64w/sC7tsLimf/3aQhx8ia0y8taNxVw6nQTRYhvJazhOEnPEN0hZV8cW12yAUWNjjU19xokJsmbaT9ICVy7LNoRhRubpPO58ICkn8A6fBaz49i+Q/WXAdzdpH5nvu0ffz5Vm2QXD5BC6MZcBn3NQX8sDftUK1lqUNuSJIppTR6cUuZW+RluuiajssxYT7LX5BUgW4vTgf1CcPJ5AlI2JLeytphOc7xEwJBk72vO9eLXQZ8CiSwHCYcz9QGDbPke1xfmlqBwjN/FaCLSk7fi1zEMLbDy0K8b26KUqlOaulPX2hjWsBzfX1TykrusqDxYZ72tIWe2GHPsLGQPEkmhUHlUSPaIMDkYIPydLcvLwS8YObThShCvG6AVmSR3v/25SM3pfb98AtLuKLieTq5kQFOog1HRqLjDZ4CdXFhxzLfoQb9+tXYC/cKsyD4GqVL6CQlfERhKUDMwSu284/6g6pqdVvZ7rzE7oiXgyO9PM+T9vA/j4UeNTahANbSx28AQrWa3n5EQHNOHMSAxv4rnpyDYUTUBrlTKYAUTHSvenKgBr9BKnGjJ4Oa+1jMpjgzw+BJT8smhJTVSQr5XFQoXiAUK2nzg=
on:
tags: true
branch: master
stages:
- name: test
- name: deploy

+ 76
- 0
bin/tag ファイルの表示

@@ -0,0 +1,76 @@
#!/usr/bin/env bash

set +o errexit

git diff-index --quiet HEAD
if [ $? == 1 ]
then
echo >&2 "Git repository not clean. Aborting."
exit 1
fi

set -o errexit
set -o pipefail
set -o nounset

function increment_version {
IFS='.' read -a versions <<< "${1}"

major=${versions[0]}
minor=${versions[1]}
patch=${versions[2]}

case "${2}" in
"major")
major=$((major + 1))
minor=0
patch=0
;;
"minor")
minor=$((minor + 1))
patch=0
;;
"patch")
patch=$((patch + 1))
;;
esac
new_version="$major.$minor.$patch"
echo ${new_version}
}

function replace_versions_in_files {
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" package.json
sed -i "s/__version__ = \"${1}\"/__version__ = \"${2}\"/g" cli/lesspass/version.py
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" mobile/package.json
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-crypto/package.json
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-entropy/package.json
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-fingerprint/package.json
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-profiles/package.json
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-pure/package.json
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-render-password/package.json
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-web-component/package.json
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-web-extension/package.json
sed -i "s/\"version\": \"${1}\"/\"version\": \"${2}\"/g" packages/lesspass-web-site/package.json
}

function tag {
git add .
git commit --message="LessPass version ${1}"
git tag "${1}"
}

__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
__root="$(cd "$(dirname "${__dir}")" && pwd)"
pushd ${__root}
bump_type="${1:-}"
if [ "${bump_type}" == "major" ] || [ "${bump_type}" == "minor" ] || [ "${bump_type}" == "patch" ]
then
current_version=$(grep -Po '(?<="version": ")[^"]*' package.json)
new_version=$( increment_version ${current_version} ${bump_type} )
replace_versions_in_files ${current_version} ${new_version}
tag ${new_version}
else
echo >&2 "Error: No bump type specified (major, minor, patch). Aborting."
exit 1
fi

+ 1
- 1
cli/lesspass/version.py ファイルの表示

@@ -1 +1 @@
__version__ = "7.0.2"
__version__ = "8.0.0"

+ 1
- 1
mobile/package.json ファイルの表示

@@ -1,6 +1,6 @@
{
"name": "lesspass-mobile",
"version": "3.1.6",
"version": "8.0.0",
"description": "LessPass mobile application",
"license": "(MPL-2.0 OR GPL-3.0)",
"author": {


+ 1
- 1
package.json ファイルの表示

@@ -1,6 +1,6 @@
{
"name": "lesspass",
"version": "1.0.0",
"version": "8.0.0",
"description": "LessPass mono repo",
"repository": "https://github.com/lesspass/lesspass",
"author": "Guillaume Vincent <guillaume@oslab.fr>",


+ 1
- 1
packages/lesspass-crypto/package.json ファイルの表示

@@ -1,6 +1,6 @@
{
"name": "lesspass-crypto",
"version": "1.0.0",
"version": "8.0.0",
"description": "LessPass cryptographic functions",
"license": "GPL-3.0",
"author": "Guillaume Vincent <guillaume@oslab.fr>",


+ 1
- 1
packages/lesspass-entropy/package.json ファイルの表示

@@ -1,6 +1,6 @@
{
"name": "lesspass-entropy",
"version": "1.0.0",
"version": "8.0.0",
"description": "LessPass module used to generate entropy for password generation",
"author": "Guillaume Vincent <guillaume@oslab.fr>",
"license": "GPL-3.0",


+ 1
- 1
packages/lesspass-fingerprint/package.json ファイルの表示

@@ -1,6 +1,6 @@
{
"name": "lesspass-fingerprint",
"version": "1.0.0",
"version": "8.0.0",
"description": "LessPass node module used to get fingerprint for 256 bytes string",
"license": "GPL-3.0",
"author": "Guillaume Vincent <guillaume@oslab.fr>",


+ 1
- 1
packages/lesspass-profiles/package.json ファイルの表示

@@ -1,6 +1,6 @@
{
"name": "lesspass-profiles",
"version": "1.0.0",
"version": "8.0.0",
"description": "",
"license": "GPL-3.0",
"author": "Guillaume Vincent <guillaume@oslab.fr>",


+ 1
- 1
packages/lesspass-pure/package.json ファイルの表示

@@ -1,6 +1,6 @@
{
"name": "lesspass-pure",
"version": "5.1.8",
"version": "8.0.0",
"description": "LessPass web component",
"license": "GPL-3.0",
"author": "Guillaume Vincent <guillaume@oslab.fr>",


+ 1
- 1
packages/lesspass-render-password/package.json ファイルの表示

@@ -1,6 +1,6 @@
{
"name": "lesspass-render-password",
"version": "1.0.0",
"version": "8.0.0",
"description": "LessPass node module used to render password from entropy and options",
"license": "GPL-3.0",
"author": "Guillaume Vincent <guillaume@oslab.fr>",


+ 1
- 1
packages/lesspass-web-component/package.json ファイルの表示

@@ -1,6 +1,6 @@
{
"name": "lesspass-web-component",
"version": "1.0.0",
"version": "8.0.0",
"description": "LessPass web component",
"license": "GPL-3.0",
"author": "Guillaume Vincent <guillaume@oslab.fr>",


+ 1
- 1
packages/lesspass-web-extension/package.json ファイルの表示

@@ -1,7 +1,7 @@
{
"name": "lesspass-web-extension",
"description": "LessPass web extension",
"version": "3.1.6",
"version": "8.0.0",
"license": "GPL-3.0",
"author": "Guillaume Vincent <guillaume@oslab.fr>",
"scripts": {


+ 1
- 1
packages/lesspass-web-site/package.json ファイルの表示

@@ -1,6 +1,6 @@
{
"name": "lesspass-web-site",
"version": "1.0.0",
"version": "8.0.0",
"description": "LessPass web site",
"license": "GPL-3.0",
"author": "Guillaume Vincent <guillaume@oslab.fr>",


読み込み中…
キャンセル
保存