mirror of
https://github.com/fluencelabs/fluence-network-environment
synced 2024-12-04 16:20:17 +00:00
change increment algorithm
This commit is contained in:
parent
8a91187bdb
commit
e24c180454
16
.github/workflows/publish_release.yml
vendored
16
.github/workflows/publish_release.yml
vendored
@ -26,12 +26,20 @@ jobs:
|
|||||||
set -x
|
set -x
|
||||||
yarn global add semver
|
yarn global add semver
|
||||||
PATH="$(yarn global bin):$PATH"
|
PATH="$(yarn global bin):$PATH"
|
||||||
LOCAL_VERSION="$(cat package.json | jq -r .version)"
|
|
||||||
|
# take npm version and increment it
|
||||||
PKG_NAME="$(cat package.json | jq .name)"
|
PKG_NAME="$(cat package.json | jq .name)"
|
||||||
NPM_VERSION="$(yarn info --silent "$PKG_NAME" version || true)"
|
NPM_VERSION="$(yarn info --silent "$PKG_NAME" version || true)"
|
||||||
MAX_VERSION="$(semver "$LOCAL_VERSION" "$NPM_VERSION" "0.0.0" | tail -n1)"
|
NEXT_NPM_VERSION="$(semver --increment patch "$NPM_VERSION")"
|
||||||
FINAL_VERSION="$(semver --increment patch "$MAX_VERSION")"
|
|
||||||
echo "FINAL_VERSION=$FINAL_VERSION" | tee -a $GITHUB_ENV
|
# take local version
|
||||||
|
LOCAL_VERSION="$(cat package.json | jq -r .version)"
|
||||||
|
|
||||||
|
# take maximum of the local and NEXT_NPM versions
|
||||||
|
MAX_VERSION="$(semver "$LOCAL_VERSION" "$NEXT_NPM_VERSION" "0.0.0" | tail -n1)"
|
||||||
|
|
||||||
|
# save version to env
|
||||||
|
echo "FINAL_VERSION=$MAX_VERSION" | tee -a $GITHUB_ENV
|
||||||
|
|
||||||
### Set version
|
### Set version
|
||||||
- name: Set version to ${{ env.FINAL_VERSION }}
|
- name: Set version to ${{ env.FINAL_VERSION }}
|
||||||
|
Loading…
Reference in New Issue
Block a user