Skip to content

chore(travis): do not publish next version #875

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 3 commits into from
Jul 3, 2017
Merged
Show file tree
Hide file tree
Changes from 2 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
16 changes: 0 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
env:
global:
- NODE_VERSION=6.9.1
- DATE=$(date +%Y-%m-%d)
- PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER
- EMULATOR_API_LEVEL=19
- ANDROID_VERSION=23
- ANDROID_BUILD_TOOLS_VERSION=23.0.1
Expand Down Expand Up @@ -47,17 +45,3 @@ script:
- tns build android
- android-wait-for-emulator
- npm run appium --runtype=android19 --appium=$APPIUM_VERSION
before_deploy:
- cd ../nativescript-angular
- npm install -g nativescript --ignore-scripts
- tns usage-reporting disable
- tns error-reporting disable
- node ../build/travis-scripts/add-publishConfig.js next $PACKAGE_VERSION
deploy:
provider: npm
email: [email protected]
skip_cleanup: true
api_key:
secure: J88MqLAoZStZZ77AAf+wgaoZp+8zG3fOUHRneSe4x/yEzyUShS9SlGuq0TSkm9sJVX94iHJl1BQ4yjLshOPV9dkOg1+BB4PbsDTKPCAhPCZgpW7WKz6iImmuWHArchLIRtI1fp+UYi1+V6c7gLALQPY7qR2QJcDJdq1tdgORAyGySMis95ttVhnn6DWTBbs/ocu+IzgOyBSkIiZR0mGk7q/pmVQPy+XL5PQoyUOhD4MmvAAIeVr+XoZ5I8pAUwhi1/bZijXrzWe7LbXh8pTDlEWvYduzYYjJZqUrHiE/e1e8/DIPXGaBUQBj7LRxSqqO8AJXGeCg4DF1R9j4CSG5c0pAwQ/U6vOGu8duPEGaoKG5+HlrTav7gI/YbwFA5HKyh1uzQ5trZDJ4mMKUoB1+8/eL2cjLudtyBB2Kg28wH6f78A9mQC1EJcP7Jz3qJTSUyhczIvwSF8/EkD8xmeaoTi2e+4TNgf7pys1cp6c7m7zKZbvVy25lfyAfG1rCF5+rzKj+GnE9mtLaY6VvlKWjyxklh8hfRBC94TZ8K7PH0tmdgk2Jal+OCdm9FDdmNrBSC1G/gPS8PchtffIRprPhNAUfcVpdg0rlQ4dckbGRbB5UBgwHkpoKasaSTx/nO85AiK6USIYOIod19loXUBvN3QyHUX76w265UhmTnb8iojo=
on:
branch: master
23 changes: 0 additions & 23 deletions build/generate-value-accessor-selector.js

This file was deleted.

35 changes: 35 additions & 0 deletions build/prepublish-next.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env node
const fs = require("fs");
const path = require("path");

// helpers start
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop this

const getPackageJson = projectDir => {
const packageJsonPath = getPackageJsonPath(projectDir);
return JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
};

const writePackageJson = (content, projectDir) => {
const packageJsonPath = getPackageJsonPath(projectDir);
fs.writeFileSync(packageJsonPath, JSON.stringify(content, null, 2))
}

const getPackageJsonPath = projectDir => path.resolve(projectDir, "package.json");
// helpers end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop this


const tag = "next";
const projectDir = "nativescript-angular";
const packageJson = getPackageJson(projectDir);
const [, , packageVersion = new Date() ] = process.argv;

packageJson.publishConfig = Object.assign(
packageJson.publishConfig || {},
{ tag }
);

delete packageJson.private;

const currentVersion = packageJson.version;
const nextVersion = `${currentVersion}-${packageVersion}`;
const newPackageJson = Object.assign(packageJson, { version: nextVersion });

writePackageJson(newPackageJson, projectDir);
33 changes: 0 additions & 33 deletions build/travis-scripts/add-publishConfig.js

This file was deleted.