Skip to content
This repository was archived by the owner on Feb 28, 2020. It is now read-only.

Commit ba24ee9

Browse files
committed
fix(build): Fix travis build to install linux hub.
Signed-off-by: Katherine Stanley <[email protected]>
1 parent 78d1ccf commit ba24ee9

File tree

5 files changed

+13
-20
lines changed

5 files changed

+13
-20
lines changed

.travis.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ jdk:
33
- oraclejdk8
44
before_install:
55
- wget http://services.gradle.org/distributions/gradle-3.5-bin.zip
6+
- wget https://github.com/github/hub/releases/download/v2.2.9/hub-linux-386-2.2.9.tgz
67
- shasum -a 256 -c ./sha256.txt
78
- unzip -qq gradle-3.5-bin.zip
9+
- tar -xvzf hub-linux-386-2.2.9.tgz
810
- export GRADLE_HOME=$PWD/gradle-3.5
9-
- export PATH=$GRADLE_HOME/bin:$PATH
11+
- export PATH=$GRADLE_HOME/bin:$PWD/hub-linux-386-2.2.9/bin/:$PATH
1012
- gradle -v
1113
- nvm install 6.9.1
1214
- cd ./generator-java

build.sh

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ if [[ $TRAVIS_PULL_REQUEST != "false" ]]; then
44
echo "PR detected, running all tests"
55
echo "Running linter"
66
npm run lint
7+
retval=$?
78
if [ $retval != 0 ]; then
89
exit $retval
910
fi

deploy.sh

+4-15
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,17 @@ echo "Checking if a new publish cycle is required ..."
44
PKG_NAME=`node -e "console.log(require('./package.json').name);"`
55
PKG_VER=`node -e "console.log(require('./package.json').version);"`
66
NPM_VER=`npm show $PKG_NAME version --silent`
7-
CHECK_REG=$(curl https://registry.npmjs.org/$PKG_NAME)
8-
NOT_FOUND=$(node -e "console.log(Object.keys(JSON.parse(JSON.stringify($CHECK_REG))).length)")
97

108
echo "$PKG_NAME : version = $PKG_VER, npm version = $NPM_VER"
119
if [[ $TRAVIS_BRANCH == "master" ]]; then
1210
echo "Build targetting master - checking if this is a PR or not"
1311
if [[ $TRAVIS_PULL_REQUEST == "false" ]]; then
1412
echo "This is a build on master, performing additional steps"
15-
if [ $NOT_FOUND == 0 ]; then
16-
echo "$PKG_NAME is not in public registry so going to publish"
17-
npm publish
18-
elif [[ $PKG_VER == $NPM_VER ]]; then
13+
if [[ $PKG_VER == $NPM_VER ]]; then
1914
echo "Version numbers match, so changing version and committing changes"
20-
npm run prerelease
21-
if [ $? == 0 ]; then
22-
#If you are running a protected master branch then you *could* disable re-running the tests
23-
echo "Tests passed, continuing release cycle"
24-
../prerelease.sh
25-
if [ $? != 0 ]; then
26-
exit $?
27-
fi
28-
else
15+
../prerelease.sh
16+
retval=$?
17+
if [ $retval != 0 ]; then
2918
exit $?
3019
fi
3120
else

prerelease.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env bash
2-
echo "Running pre-release checks and scans"
32
echo "Determining current version"
43
CURRENT_PKG_VER_MAJOR=`node -e "console.log(require('./package.json').version.split('.')[0]);"`
54
CURRENT_PKG_VER_MINOR=`node -e "console.log(require('./package.json').version.split('.')[1]);"`
@@ -11,6 +10,10 @@ git config push.default simple
1110

1211
echo "Running smoke test"
1312
npm run prerelease
13+
retval=$?
14+
if [ $retval != 0 ]; then
15+
exit $retval
16+
fi
1417
echo "Upgrading using standard-version"
1518
npm run release
1619
retval=$?
@@ -27,9 +30,6 @@ NEXT_PKG_VER_FIX=`node -e "console.log(require('./package.json').version.split('
2730
echo "Creating git branch"
2831
BRANCH="updateTo${PKG_VER_NEXT}"
2932
git checkout -b $BRANCH
30-
31-
git status
32-
git commit -m "Update test coverage and code scan files"
3333
# this pull request through this branch will be needed to be reviewed as usual
3434
git remote rm origin
3535
git remote add origin $GITHUB_URL_SECURED

sha256.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
0b7450798c190ff76b9f9a3d02e18b33d94553f708ebc08ebe09bdf99111d110 gradle-3.5-bin.zip
2+
353772dbf336bea3cb09547a943281e317956021d853e4e3383871b2cd85a475 hub-linux-386-2.2.9.tgz

0 commit comments

Comments
 (0)