From 0a44a4d722ba858883a22ea415a7abcf29eeded6 Mon Sep 17 00:00:00 2001 From: Andrew Joslin Date: Wed, 21 May 2014 09:12:54 -0600 Subject: [PATCH] chore(travis): make release codename work correctly --- scripts/travis/ci.sh | 20 +++++++++++--------- scripts/travis/release-new-version.sh | 8 +------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/scripts/travis/ci.sh b/scripts/travis/ci.sh index c4a75a296b..0e6b4100c6 100755 --- a/scripts/travis/ci.sh +++ b/scripts/travis/ci.sh @@ -49,12 +49,22 @@ function run { mkdir -p tmp git show $TRAVIS_COMMIT~1:package.json > tmp/package.old.json - OLD_VERSION=$(readJsonProp "tmp/package.old.json" "version") + OLD_VERSION="TEST" #$(readJsonProp "tmp/package.old.json" "version") VERSION=$(readJsonProp "package.json" "version") CODENAME=$(readJsonProp "package.json" "codename") if [[ "$OLD_VERSION" != "$VERSION" ]]; then IS_RELEASE=true + + # Get first codename in list + CODENAME=$(cat config/CODENAMES | head -n 1) + # Remove first line of codenames, it's used now + echo "`tail -n +2 config/CODENAMES`" > config/CODENAMES + + replaceJsonProp "package.json" "codename" "$CODENAME" + replaceJsonProp "bower.json" "codename" "$CODENAME" + replaceJsonProp "component.json" "codename" "$CODENAME" + echo "#######################################" echo "# Releasing v$VERSION \"$CODENAME\"! #" echo "#######################################" @@ -80,14 +90,6 @@ function run { ./scripts/travis/release-new-version.sh \ --action="push" \ --version=$VERSION - ./scripts/travis/release-new-version.sh \ - --action="github" \ - --version=$VERSION \ - --old-version=$OLD_VERSION - ./scripts/travis/release-new-version.sh \ - --action="discourse" \ - --version=$VERSION \ - --old-version=$OLD_VERSION # Version name used on the CDN/docs: nightly or the version VERSION_NAME=$VERSION diff --git a/scripts/travis/release-new-version.sh b/scripts/travis/release-new-version.sh index 86d6401335..89bf575023 100755 --- a/scripts/travis/release-new-version.sh +++ b/scripts/travis/release-new-version.sh @@ -33,17 +33,11 @@ function push { cd $IONIC_DIR # Get first codename in list - CODENAME=$(cat config/CODENAMES | head -n 1) - # Remove first line of codenames, it's used now - echo "`tail -n +2 config/CODENAMES`" > config/CODENAMES + CODENAME=readJsonProp "$PROJECT_DIR/package.json" "codename" replaceJsonProp "bower.json" "version" "$VERSION" replaceJsonProp "component.json" "version" "$VERSION" - replaceJsonProp "package.json" "codename" "$CODENAME" - replaceJsonProp "bower.json" "codename" "$CODENAME" - replaceJsonProp "component.json" "codename" "$CODENAME" - echo "-- Putting built files into release folder" mkdir -p release cp -Rf $PROJECT_DIR/dist/* release