Skip to content

Commit 0dfd983

Browse files
committed
Travis CI adjustments
- Adjusted changelog.sh for TRAVIS build environment - Removed obsolete keystore and its decryption commands
1 parent 6e1122e commit 0dfd983

File tree

4 files changed

+27
-39
lines changed

4 files changed

+27
-39
lines changed

.gitignore

-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ classes
88

99
testClasses
1010

11-
keystore.properties
12-
13-
keystore.tar
14-
1511
worldwind.jar
1612

1713
worldwindx.jar

.travis.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jdk:
1313
- oraclejdk8
1414

1515
before_script:
16-
# Decrypt the keystore used to sign the Web Start distribution
17-
- 'if [[ -n "${encrypted_1799be77f389_key}" ]]; then openssl aes-256-cbc -K "${encrypted_1799be77f389_key}" -iv "${encrypted_1799be77f389_iv}" -in keystore.tar.enc -out keystore.tar -d && tar -xf keystore.tar; fi'
1816
# Use xvfb to run tests that require a GUI
1917
- "export DISPLAY=:99.0"
2018
- "sh -e /etc/init.d/xvfb start"
@@ -26,9 +24,9 @@ script:
2624

2725
# Deploy build artifacts. Travis does not invoke this step for pull request builds
2826
deploy:
29-
# Create CHANGELOG.md in the current directory
27+
# Create CHANGELOG.md in the current directory
3028
- provider: script
31-
script: 'source ./travis/changelog.sh && changelog "${TRAVIS_TAG}" "https://api.github.com/repos/${TRAVIS_REPO_SLUG}" >> CHANGELOG.md'
29+
script: ./travis/changelog.sh >> CHANGELOG.md
3230
skip_cleanup: true
3331
on:
3432
tags: true

keystore.tar.enc

-10.5 KB
Binary file not shown.

travis/changelog.sh

+25-31
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,32 @@
11
#!/bin/bash
2-
32
# Writes a change log to stdout using the GitHub API and the milestone associated with the specified Git tag
4-
function changelog() {
53

6-
# Give function arguments meaningful names
7-
GIT_TAG="$1"
8-
GITHUB_API_URL="$2"
4+
# Write Markdown headers for the Git tag and release date
5+
echo "##${TRAVIS_TAG}"
6+
echo "######Released on $(date '+%Y-%m-%d')"
97

10-
# Write Markdown headers for the Git tag and release date
11-
echo "##${GIT_TAG}"
12-
echo "######Released on $(date '+%Y-%m-%d')"
8+
# Query GitHub API for a milestone matching the Git tag
9+
GITHUB_API_URL="https://api.github.com/repos/${TRAVIS_REPO_SLUG}"
10+
MILESTONE_ARRAY=( \
11+
$(curl --silent "${GITHUB_API_URL}/milestones?state=all" \
12+
| jq --arg title "${TRAVIS_TAG}" '.[] | select(.title == $title) | .number') \
13+
) > /dev/null
1314

14-
# Query GitHub API for a milestone matching the Git tag
15-
MILESTONE_ARRAY=( \
16-
$(curl --silent "${GITHUB_API_URL}/milestones?state=all" \
17-
| jq --arg title "${GIT_TAG}" '.[] | select(.title == $title) | .number') \
15+
# When GitHub has a milestone matching the Git tag, write milestone related information to the change log
16+
if [[ "${#MILESTONE_ARRAY[@]}" -ne 0 ]]; then
17+
# Write the milestone description to the change log
18+
MILESTONE_DESCRIPTION=( \
19+
$(curl --silent "${GITHUB_API_URL}/milestones/${MILESTONE_ARRAY[0]}" \
20+
| jq .description) \
1821
) > /dev/null
22+
MILESTONE_DESCRIPTION=${MILESTONE_DESCRIPTION[*]#\"}
23+
echo ${MILESTONE_DESCRIPTION[*]%\"}
1924

20-
# When GitHub has a milestone matching the Git tag, write milestone related information to the change log
21-
if [[ "${#MILESTONE_ARRAY[@]}" -ne 0 ]]; then
22-
# Write the milestone description to the change log
23-
MILESTONE_DESCRIPTION=( \
24-
$(curl --silent "${GITHUB_API_URL}/milestones/${MILESTONE_ARRAY[0]}" \
25-
| jq .description) \
26-
) > /dev/null
27-
MILESTONE_DESCRIPTION=${MILESTONE_DESCRIPTION[*]#\"}
28-
echo ${MILESTONE_DESCRIPTION[*]%\"}
29-
30-
# Write the milestone's associated issues to the change log with each issue on a separate line with the issue
31-
# title, issue number, and a link to the issue on GitHub.com, all in markdown format: .title ([#.number](.html_url))
32-
ISSUE_ARRAY=$(curl --silent "${GITHUB_API_URL}/issues?state=all&milestone=${MILESTONE_ARRAY[0]}" | jq -c '.[] | [.title, .number, .html_url]') >> /dev/null
33-
while read line
34-
do
35-
echo ${line} | sed 's#\["\(.*\)",\(.*\),"\(.*\)"\]#- \1 ([\#\2](\3))#'
36-
done <<< "${ISSUE_ARRAY[*]}"
37-
fi
38-
}
25+
# Write the milestone's associated issues to the change log with each issue on a separate line with the issue
26+
# title, issue number, and a link to the issue on GitHub.com, all in markdown format: .title ([#.number](.html_url))
27+
ISSUE_ARRAY=$(curl --silent "${GITHUB_API_URL}/issues?state=all&milestone=${MILESTONE_ARRAY[0]}" | jq -c '.[] | [.title, .number, .html_url]') >> /dev/null
28+
while read line
29+
do
30+
echo ${line} | sed 's#\["\(.*\)",\(.*\),"\(.*\)"\]#- \1 ([\#\2](\3))#'
31+
done <<< "${ISSUE_ARRAY[*]}"
32+
fi

0 commit comments

Comments
 (0)