mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
18
.travis.yml
18
.travis.yml
@@ -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
|
||||
language: objective-c
|
||||
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
|
||||
before_script:
|
||||
- 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=
|
||||
|
||||
25
.travis/add-publishConfig.js
Normal file
25
.travis/add-publishConfig.js
Normal 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);
|
||||
@@ -6,7 +6,7 @@ def isWinOs = System.properties['os.name'].toLowerCase().contains('windows')
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
def computeCompuleSdkVersion () {
|
||||
def computeCompileSdkVersion () {
|
||||
if(project.hasProperty("compileSdk")) {
|
||||
return compileSdk
|
||||
}
|
||||
@@ -34,7 +34,7 @@ def computeTargetSdkVersion() {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion computeCompuleSdkVersion()
|
||||
compileSdkVersion computeCompileSdkVersion()
|
||||
buildToolsVersion computeBuildToolsVersion()
|
||||
|
||||
defaultConfig {
|
||||
|
||||
Reference in New Issue
Block a user