Skip to content

Added date and travis build number to version to create unique version #354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
env:
global:
- NODE_VERSION=4.4.7
- DATE=$(date +%Y-%m-%d)
- PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER

language: android

Expand Down Expand Up @@ -51,7 +53,7 @@ before_deploy:
- cd ../nativescript-angular
- npm install typescript -g
- npm install
- node ../build/travis-scripts/add-publishConfig.js next
- node ../build/travis-scripts/add-publishConfig.js next $PACKAGE_VERSION

deploy:
provider: npm
Expand Down
4 changes: 4 additions & 0 deletions build/travis-scripts/add-publishConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,9 @@ if (packageDef.private) {
delete packageDef.private;
}

// adding date and travis build number (2016-07-18-765) to version in order to get unique version for @next build
var package_version = process.argv[3];
packageDef.version += '-' + package_version;

var newContent = JSON.stringify(packageDef, null, ' ');
fsModule.writeFileSync(path, newContent, fileOptions);