diff --git a/.travis.yml b/.travis.yml index e112065840..bdef25463c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -127,6 +127,9 @@ jobs: - stage: "Build Demo shell" name: "Demo Shell & Storybook :Build && dockerize" + before_script: + - NODE_OPTIONS="--max-old-space-size=8192" $(npm bin)/nx run cli:build --prod + - ./scripts/build/build-cli.sh script: # Build Demo shell & Storybook for production docker" - NODE_OPTIONS=--max_old_space_size=8192 nx build demoshell --configuration production diff --git a/scripts/next_version.sh b/scripts/next_version.sh index 5b30f5efe1..5b23176c70 100755 --- a/scripts/next_version.sh +++ b/scripts/next_version.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash set -f +# By default NEXT_VERSION is set to the current version, so we can change only the aplha suffix as well +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +NEXT_VERSION=`node -p "require('$DIR/../package.json')".version;`; + eval EXEC_PATCH=false eval EXEC_MAJOR=false eval EXEC_MINOR=false diff --git a/scripts/travis/release/deprecate-develop-build.sh b/scripts/travis/release/deprecate-develop-build.sh index 8c54c4886b..01e71466ab 100755 --- a/scripts/travis/release/deprecate-develop-build.sh +++ b/scripts/travis/release/deprecate-develop-build.sh @@ -50,7 +50,7 @@ for PACKAGE in ${projects[@]} do echo "@alfresco/$PACKAGE" - for VERSION_TO_DEPRECATE in $(npm view "@alfresco/$PACKAGE" versions --json | jq -r '.[] | select( . | contains("-")) | select( . | contains("'$VERSION'"))') + for VERSION_TO_DEPRECATE in $(npm view "@alfresco/$PACKAGE" versions --json | jq -r '.[] | select( . | match("-[0-9].*$") ) | select( . | contains("'$VERSION'"))') do deprecated=$(npm view "@alfresco/$PACKAGE@$VERSION_TO_DEPRECATE" -json | jq '.deprecated') diff --git a/scripts/update-version.sh b/scripts/update-version.sh index c1dbf777b0..997b252cbc 100755 --- a/scripts/update-version.sh +++ b/scripts/update-version.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +VERSION_IN_PACKAGE_JSON=`node -p "require('$DIR/../package.json')".version;`; + eval JS_API=true eval GNU=false eval DIFFERENT_JS_API=false @@ -47,8 +49,15 @@ last_alpha_mode() { } next_alpha_mode() { - echo "====== Auto find next ALPHA version ===== ${SEMANTIC} " - VERSION=$(./next_version.sh -${SEMANTIC} -alpha) + # If we are creating a new alpha for a prerelease, we need to simply call it with -alpha + if [[ $VERSION_IN_PACKAGE_JSON =~ [0-9]*\.[0-9]*\.[0-9]*-.* ]]; then + SEMANTIC_PARAM=""; + else + SEMANTIC_PARAM="-${SEMANTIC}"; + fi + + echo "====== Auto find next ALPHA version ===== ${SEMANTIC_PARAM} " + VERSION=$(./next_version.sh ${SEMANTIC_PARAM} -alpha) echo "====== version lib ${VERSION} =====" JS_API=false