Publish @next

Update .travis.yml.
Add .travis/add-publishConfig.js.
Fix a typo.
This commit is contained in:
vchimev
2016-07-14 16:14:20 +03:00
parent 4d53d46769
commit ecebdb6101
3 changed files with 44 additions and 3 deletions

View File

@@ -1,3 +1,8 @@
env:
global:
- DATE=$(date +%Y-%m-%d)
- PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER
- PACKAGE_NAME=tns-core-modules-widgets
sudo: false sudo: false
language: objective-c language: objective-c
osx_image: xcode7.3 osx_image: xcode7.3
@@ -7,4 +12,15 @@ install:
- echo y | android update sdk -t android-23,build-tools-23.0.3,extra-android-m2repository --no-ui --all - echo y | android update sdk -t android-23,build-tools-23.0.3,extra-android-m2repository --no-ui --all
before_script: before_script:
- export ANDROID_HOME=/usr/local/opt/android-sdk - export ANDROID_HOME=/usr/local/opt/android-sdk
script: ./build.sh script: ./build.sh $PACKAGE_VERSION
before_deploy:
- cd ./dist/package/
- node ../../.travis/add-publishConfig.js next
deploy:
provider: npm
email: nativescript@telerik.com
on:
branch: master
skip_cleanup: true
api_key:
secure: j2gE5jnGSuCFy7s3pDB6Or2j+vhlRYIlSSB1mDI7R5PvpV0kWr8yE1rLnyqeb0pI7WY/36SV/0NZCClJhlrZFvd7QvaP3+55cGX3ijmsDp8WxfQRyHppA9RZuMFujG7swFr/s0RmoYgO9mYNe46lJTX8m0HZeNN2qlAC7LDD3x8=

View File

@@ -0,0 +1,25 @@
#!/usr/bin/env node
var fsModule = require('fs');
//Adds a publishConfig section to the package.json file
// and sets a tag to it
var path = './package.json';
var fileOptions = {encoding: "utf-8"};
var content = fsModule.readFileSync(path, fileOptions);
var tag = process.argv[2];
if (!tag) {
console.log('Please pass the tag name as an argument!');
process.exit(1);
}
var packageDef = JSON.parse(content);
if (!packageDef.publishConfig) {
packageDef.publishConfig = {};
}
packageDef.publishConfig.tag = tag;
var newContent = JSON.stringify(packageDef, null, ' ');
fsModule.writeFileSync(path, newContent, fileOptions);

View File

@@ -6,7 +6,7 @@ def isWinOs = System.properties['os.name'].toLowerCase().contains('windows')
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
def computeCompuleSdkVersion () { def computeCompileSdkVersion () {
if(project.hasProperty("compileSdk")) { if(project.hasProperty("compileSdk")) {
return compileSdk return compileSdk
} }
@@ -34,7 +34,7 @@ def computeTargetSdkVersion() {
} }
android { android {
compileSdkVersion computeCompuleSdkVersion() compileSdkVersion computeCompileSdkVersion()
buildToolsVersion computeBuildToolsVersion() buildToolsVersion computeBuildToolsVersion()
defaultConfig { defaultConfig {