chore(travis): make release codename work correctly

This commit is contained in:
Andrew Joslin
2014-05-21 09:12:54 -06:00
parent d8b7c8fb82
commit 0a44a4d722
2 changed files with 12 additions and 16 deletions

View File

@@ -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

View File

@@ -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