Skip to content

Commit 4fb6537

Browse files
authored
Merge pull request #27 from IBM/subin-fix-build
build: update travis configuration
2 parents 1accaf5 + 4494a81 commit 4fb6537

File tree

6 files changed

+21
-27
lines changed

6 files changed

+21
-27
lines changed

.travis.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
language: java
3-
dist: bionic
3+
dist: jammy
44

55
jdk:
66
- openjdk11
@@ -29,8 +29,7 @@ stages:
2929

3030
before_install:
3131
- sudo apt-get update
32-
- env | grep TRAVIS
33-
- pyenv global 3.8
32+
- echo -e "machine github.ibm.com\n login $GITHUB_ACCESS_TOKEN" > ~/.netrc
3433

3534
jobs:
3635
include:
@@ -48,7 +47,9 @@ jobs:
4847

4948
- stage: Semantic-Release
5049
install:
51-
- nvm install 14
50+
- nvm install 18
51+
- node --version
52+
- npm --version
5253
- npm install
5354
- pip install --user bump2version
5455
script:

build/generateJavadocIndex.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ echo '<!DOCTYPE html>
2121
| <a href="https://github.com/IBM/ibm-iae-java-sdk">GitHub</a>
2222
</p>
2323
24-
<p>Javadoc by branch/release:</p>
25-
<ul><li><a href="docs/latest">Latest</a></li>'
26-
ls docs | grep --invert-match index.html | sed 's/^.*/<li><a href="docs\/&">&<\/a><\/li>/'
24+
<p>Javadoc by release:</p>
25+
<ul>'
26+
echo ${TRAVIS_BRANCH} | sed 's/^.*/ <li><a href="docs\/&">Latest release<\/a><\/li>/'
27+
ls docs | grep --invert-match index.html | sed 's/^.*/ <li><a href="docs\/&">&<\/a><\/li>/'
2728
echo ' </ul>
2829
</div>
2930
</body>

build/publishJavadoc.sh

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# The javadocs are committed and pushed to the git repository's gh-pages branch.
55
# Be sure to customize this file to reflect your SDK project's settings (git url,
66

7-
# Avoid publishing javadocs for a PR build
8-
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" ]; then
7+
# Publish javadocs only for a tagged-release.
8+
if [[ -n "${TRAVIS_TAG}" ]]; then
99

1010
printf "\n>>>>> Publishing javadoc for release build: repo=%s branch=%s build_num=%s job_num=%s\n" ${TRAVIS_REPO_SLUG} ${TRAVIS_BRANCH} ${TRAVIS_BUILD_NUMBER} ${TRAVIS_JOB_NUMBER}
1111

@@ -15,31 +15,20 @@ if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" ]; then
1515

1616
printf "\n>>>>> Finished cloning...\n"
1717

18-
1918
pushd gh-pages
2019

21-
# Create a new directory for this branch/tag and copy the aggregated javadocs there.
22-
printf "\n>>>>> Copying aggregated javadocs to new tagged-release directory: %s\n" ${TRAVIS_BRANCH}
20+
# Create a new directory for this branch/tag and copy the javadocs there.
21+
printf "\n>>>>> Copying javadocs to new directory: docs/%s\n" ${TRAVIS_BRANCH}
2322
rm -rf docs/${TRAVIS_BRANCH}
2423
mkdir -p docs/${TRAVIS_BRANCH}
2524
cp -rf ../target/site/apidocs/* docs/${TRAVIS_BRANCH}
2625

2726
printf "\n>>>>> Generating gh-pages index.html...\n"
2827
../build/generateJavadocIndex.sh > index.html
2928

30-
# Update the 'latest' symlink to point to this branch if it's a tagged release.
31-
if [ -n "$TRAVIS_TAG" ]; then
32-
pushd docs
33-
rm latest
34-
ln -s ./${TRAVIS_TAG} latest
35-
printf "\n>>>>> Updated 'docs/latest' symlink:\n"
36-
ls -l latest
37-
popd
38-
fi
39-
4029
printf "\n>>>>> Committing new javadoc...\n"
4130
git add -f .
42-
git commit -m "Javadoc for release ${TRAVIS_TAG} (${TRAVIS_COMMIT})"
31+
git commit -m "docs: latest javadoc for ${TRAVIS_BRANCH} (${TRAVIS_COMMIT})"
4332
git push -f origin gh-pages
4433

4534
popd

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
"description": "This package.json is being used to manage semantic-release and its dependencies",
55
"license": "Apache-2.0",
66
"devDependencies": {
7-
"semantic-release": "19.0.5",
8-
"@semantic-release/changelog": "6.0.2",
7+
"semantic-release": "21.0.7",
8+
"@semantic-release/changelog": "6.0.3",
99
"@semantic-release/exec": "6.0.3",
1010
"@semantic-release/git": "10.0.1"
1111
},
12+
"overrides": {
13+
"semver": "^7.5.3"
14+
},
1215
"scripts": {
1316
"semantic-release": "semantic-release"
1417
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
of the SDK generator used to generate your SDK code.
2525
See this link for details: https://github.ibm.com/CloudEngineering/openapi-sdkgen/wiki/Compatibility-Chart
2626
-->
27-
<sdk-core-version>9.17.5</sdk-core-version>
27+
<sdk-core-version>9.19.0</sdk-core-version>
2828

2929
<!-- >>> Replace this with the name of your SDK's github repository -->
3030
<git-repository-name>ibm-iae-java-sdk</git-repository-name>

scripts/templates/parent-pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<!-- This is the version associated with the Java core. The version used
2424
here should be compatible with the version of the SDK generator used to generate
2525
your SDK code. See this link for details: https://github.ibm.com/CloudEngineering/openapi-sdkgen/wiki/Compatibility-Chart -->
26-
<sdk-core-version>9.17.5</sdk-core-version>
26+
<sdk-core-version>9.19.0</sdk-core-version>
2727

2828
<!-- >>> Replace this with the name of your SDK's github repository -->
2929
<git-repository-name>my-services-java-sdk</git-repository-name>

0 commit comments

Comments
 (0)