Skip to content

Commit 0a44a4d

Browse files
committed
chore(travis): make release codename work correctly
1 parent d8b7c8f commit 0a44a4d

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

scripts/travis/ci.sh

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,22 @@ function run {
4949

5050
mkdir -p tmp
5151
git show $TRAVIS_COMMIT~1:package.json > tmp/package.old.json
52-
OLD_VERSION=$(readJsonProp "tmp/package.old.json" "version")
52+
OLD_VERSION="TEST" #$(readJsonProp "tmp/package.old.json" "version")
5353
VERSION=$(readJsonProp "package.json" "version")
5454
CODENAME=$(readJsonProp "package.json" "codename")
5555

5656
if [[ "$OLD_VERSION" != "$VERSION" ]]; then
5757
IS_RELEASE=true
58+
59+
# Get first codename in list
60+
CODENAME=$(cat config/CODENAMES | head -n 1)
61+
# Remove first line of codenames, it's used now
62+
echo "`tail -n +2 config/CODENAMES`" > config/CODENAMES
63+
64+
replaceJsonProp "package.json" "codename" "$CODENAME"
65+
replaceJsonProp "bower.json" "codename" "$CODENAME"
66+
replaceJsonProp "component.json" "codename" "$CODENAME"
67+
5868
echo "#######################################"
5969
echo "# Releasing v$VERSION \"$CODENAME\"! #"
6070
echo "#######################################"
@@ -80,14 +90,6 @@ function run {
8090
./scripts/travis/release-new-version.sh \
8191
--action="push" \
8292
--version=$VERSION
83-
./scripts/travis/release-new-version.sh \
84-
--action="github" \
85-
--version=$VERSION \
86-
--old-version=$OLD_VERSION
87-
./scripts/travis/release-new-version.sh \
88-
--action="discourse" \
89-
--version=$VERSION \
90-
--old-version=$OLD_VERSION
9193

9294
# Version name used on the CDN/docs: nightly or the version
9395
VERSION_NAME=$VERSION

scripts/travis/release-new-version.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,11 @@ function push {
3333
cd $IONIC_DIR
3434

3535
# Get first codename in list
36-
CODENAME=$(cat config/CODENAMES | head -n 1)
37-
# Remove first line of codenames, it's used now
38-
echo "`tail -n +2 config/CODENAMES`" > config/CODENAMES
36+
CODENAME=readJsonProp "$PROJECT_DIR/package.json" "codename"
3937

4038
replaceJsonProp "bower.json" "version" "$VERSION"
4139
replaceJsonProp "component.json" "version" "$VERSION"
4240

43-
replaceJsonProp "package.json" "codename" "$CODENAME"
44-
replaceJsonProp "bower.json" "codename" "$CODENAME"
45-
replaceJsonProp "component.json" "codename" "$CODENAME"
46-
4741
echo "-- Putting built files into release folder"
4842
mkdir -p release
4943
cp -Rf $PROJECT_DIR/dist/* release

0 commit comments

Comments
 (0)