-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
85 lines (85 loc) · 3.16 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
sudo: false
before_install:
- git pull --depth=200 --quiet
- cd adaptive-arp-api-specs
- npm install -g typescript
- npm install -g replace
- export HOME=`pwd`
- export TIMESTAMP=`date`
- export CURRENT_TAG=`git describe --abbrev=0`
- export CURRENT_TAG=`echo ${CURRENT_TAG//[v]/ }`
- mkdir -p .git
- git config --global credential.helper "store --file=$HOME/.git/credentials"
- git config --global user.email "[email protected]"
- git config --global user.name "carloslozano"
- git config --global push.default simple
- echo "https://${GH_TOKEN}:@github.com" > $HOME/.git/credentials
language: java
node_js:
- '0.12'
jdk: oraclejdk8
after_success: |-
if [ "$TRAVIS_BRANCH" == "$TRAVIS_TAG" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
mkdir temp
cd temp
git clone https://github.com/AdaptiveMe/adaptive-arp-tools-generator.git --quiet
cd adaptive-arp-tools-generator
export GENERATOR_HOME=`pwd`
./gradlew assemble
./gradlew installDist
./build/install/jenerator/bin/jenerator
cd $GENERATOR_HOME/work/adaptive-arp-api-lib-java
git add -v -A .
git commit -a -m "Release from API ${CURRENT_TAG} at ${TIMESTAMP}."
git push origin
cd $GENERATOR_HOME/work/adaptive-arp-api-lib-darwin
git add -v -A .
git commit -a -m "Release from API ${CURRENT_TAG} at ${TIMESTAMP}."
git push origin
cd $GENERATOR_HOME/work/adaptive-arp-api-lib-dotnet
git add -v -A .
git commit -a -m "Release from API ${CURRENT_TAG} at ${TIMESTAMP}."
git push origin
cd $GENERATOR_HOME/work/adaptive-arp-typescript
git add -v -A .
git commit -a -m "Release from API ${CURRENT_TAG} at ${TIMESTAMP}."
git push origin
cd $GENERATOR_HOME/work/adaptive-arp-android
git add -v -A .
git commit -a -m "Release from API ${CURRENT_TAG} at ${TIMESTAMP}."
git push origin
elif [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
mkdir temp
cd temp
git clone https://github.com/AdaptiveMe/adaptive-arp-tools-generator.git --quiet
cd adaptive-arp-tools-generator
export GENERATOR_HOME=`pwd`
./gradlew assemble
./gradlew installDist
./build/install/jenerator/bin/jenerator
cd $GENERATOR_HOME/work/adaptive-arp-api-lib-java
git add -v -A .
git commit -a -m "Updated from API ${CURRENT_TAG} at ${TIMESTAMP}."
git push origin
cd $GENERATOR_HOME/work/adaptive-arp-api-lib-darwin
git add -v -A .
git commit -a -m "Updated from API ${CURRENT_TAG} at ${TIMESTAMP}."
git push origin
cd $GENERATOR_HOME/work/adaptive-arp-api-lib-dotnet
git add -v -A .
git commit -a -m "Updated from API ${CURRENT_TAG} at ${TIMESTAMP}."
git push origin
cd $GENERATOR_HOME/work/adaptive-arp-typescript
git add -v -A .
git commit -a -m "Updated from API ${CURRENT_TAG} at ${TIMESTAMP}."
git push origin
cd $GENERATOR_HOME/work/adaptive-arp-android
git add -v -A .
git commit -a -m "Updated from API ${CURRENT_TAG} at ${TIMESTAMP}."
git push origin
else
echo "Nothing else to do..."
fi
env:
global:
secure: W4/j5NW+URP85LYVcTgLMxXRJtYN4bTS959V238oQ2uJNXJRTYAplhXijRf07CVoi4KJTHwDat1eK47rw2kC7tSrFM/wvf9Y8gluXZluXk1gbDzcHLEhRHh/dQIXvEXGEGguQxA26z+P5L/40hIB/R8vzdwZKTbc7mVu3g6zA24=