diff --git a/.travis.yml b/.travis.yml index e62e820622..89802cd25d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,7 +48,7 @@ jobs: - npm install - ./scripts/lint.sh || exit 1 - npm run spellcheck || exit 1 - - rm -rf tmp && (./scripts/smart-build.sh -b $TRAVIS_BRANCH || exit 1;); + - (./scripts/smart-build.sh -b $TRAVIS_BRANCH || exit 1;); - npm run build:dist || exit 1 - stage: Unit test name: core diff --git a/scripts/affected-libs.sh b/scripts/affected-libs.sh index 4034d62a38..80542dacd7 100755 --- a/scripts/affected-libs.sh +++ b/scripts/affected-libs.sh @@ -43,6 +43,7 @@ if [ ! -f $DIRECTORY/deps.txt ]; then npm run affected:libs -- $HEAD_SHA_BRANCH "HEAD" > $DIRECTORY/deps.txt fi +cat $DIRECTORY/deps.txt #echo "extensions" > deps.txt #clean file diff --git a/scripts/smart-build.sh b/scripts/smart-build.sh index 6d75563b60..65a42b6f4f 100755 --- a/scripts/smart-build.sh +++ b/scripts/smart-build.sh @@ -25,7 +25,10 @@ then exit 0 fi +#reset the tmp folder +rm -rf tmp affected="$(./scripts/affected-libs.sh -b "$BRANCH_NAME")" +echo $affected libs=(`echo $affected | sed 's/^$/\n/g'`) #core diff --git a/scripts/update-version.sh b/scripts/update-version.sh index 5a2dd9407c..0100ae401d 100755 --- a/scripts/update-version.sh +++ b/scripts/update-version.sh @@ -19,6 +19,8 @@ cd `dirname $0` prefix="@alfresco\/adf-" +projectslength=${#projects[@]} + show_help() { echo "Usage: update-version.sh" echo "" @@ -42,8 +44,9 @@ skip_js() { } last_alpha_mode() { - echo "====== Auto find last ALPHA version =====" - VERSION=$(npm view @alfresco/adf-core@alpha version) + length=`expr $projectslength - 1` + echo "====== Auto find last ALPHA version of ${projects[${length}]} =====" + VERSION=$(npm view @alfresco/adf-${projects[${length}]}@alpha version) echo "====== version lib ${VERSION} =====" @@ -219,8 +222,6 @@ fi cd "$DIR/../" -projectslength=${#projects[@]} - echo "====== UPDATE COMPONENTS ======" # use for loop to read all values and indexes