mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(travis): make release codename work correctly
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user