This repository has been archived by the owner on Sep 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
129 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
*.xml text | ||
*.yaml text | ||
*.yml text | ||
*.enc binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Fail script on error | ||
set -e | ||
|
||
cd .travis | ||
mkdir secrets | ||
|
||
# GPG is required for artifact signing | ||
openssl aes-256-cbc -k "$SUPER_SECRET_KEY" -in secrets.tar.enc -out secrets/secrets.tar -d | ||
|
||
cd secrets | ||
tar xvf secrets.tar | ||
|
||
gpg --import gpg-secret.key | ||
gpg --import-ownertrust gpg-ownertrust | ||
|
||
# Decrypt GitHub SSH key | ||
chmod 600 github_deploy | ||
eval $(ssh-agent -s) | ||
ssh-add ./github_deploy | ||
|
||
cd .. | ||
rm -rf ./secrets | ||
|
||
cd .. | ||
|
||
git config --global user.name "pgjdbc CI" | ||
git config --global user.email "[email protected]" | ||
|
||
# By default Travis checks out commit, and maven-release-plugin wants to know branch name | ||
# On top of that, maven-release-plugin publishes branch, and it would terminate Travis job (current one!), | ||
# so we checkout a non-existing branch, so it won't get published | ||
# Note: at the end, we need to update "master" branch accordingly" (see $ORIGINAL_BRANCH) | ||
TMP_BRANCH=tmp/$TRAVIS_BRANCH | ||
git checkout -b "$TMP_BRANCH" | ||
|
||
# Remove tmp branch if exists | ||
git push [email protected]:$TRAVIS_REPO_SLUG.git ":$TMP_BRANCH" || true | ||
|
||
set -x | ||
# -Darguments here is for maven-release-plugin | ||
MVN_SETTINGS=$(pwd)/.travis/settings.xml | ||
mvn -B --settings .travis/settings.xml -Darguments="--settings '${MVN_SETTINGS}'" release:prepare release:perform | ||
|
||
# Point "master" branch to "next development snapshot commit" | ||
ORIGINAL_BRANCH=${TRAVIS_BRANCH#release/} | ||
git push [email protected]:$TRAVIS_REPO_SLUG.git "HEAD:$ORIGINAL_BRANCH" | ||
# Removal of the temporary branch is a separate command, so it left behind for the analysis in case "push to master" fails | ||
git push [email protected]:$TRAVIS_REPO_SLUG.git ":$TMP_BRANCH" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="UTF8"?> | ||
<toolchains> | ||
<!-- | ||
JDK toolchains to be used to build PgJDBC for JRE6 or JDR7. | ||
Note: in order to release PgJDBC, you need all three JDK to be set via toolchains. | ||
The file should be placed to ~/.m2/toolchains.xml | ||
Default locations are: | ||
Mac OS: /Library/Java/JavaVirtualMachines/jdk1.7.0_XY.jdk/Contents/Home | ||
Ubuntu: /usr/lib/jvm/java-7-openjdk-amd64 | ||
--> | ||
<toolchain> | ||
<type>jdk</type> | ||
<provides> | ||
<version>1.6</version> | ||
<vendor>oracle</vendor> | ||
</provides> | ||
<configuration> | ||
<jdkHome>${JDK6_HOME}</jdkHome> | ||
</configuration> | ||
</toolchain> | ||
<toolchain> | ||
<type>jdk</type> | ||
<provides> | ||
<version>1.7</version> | ||
<vendor>oracle</vendor> | ||
</provides> | ||
<configuration> | ||
<jdkHome>${JDK7_HOME}</jdkHome> | ||
</configuration> | ||
</toolchain> | ||
<toolchain> | ||
<type>jdk</type> | ||
<provides> | ||
<version>1.8</version> | ||
<vendor>oracle</vendor> | ||
</provides> | ||
<configuration> | ||
<jdkHome>${JDK8_HOME}</jdkHome> | ||
</configuration> | ||
</toolchain> | ||
<toolchain> | ||
<type>jdk</type> | ||
<provides> | ||
<version>1.9</version> | ||
<vendor>oracle</vendor> | ||
</provides> | ||
<configuration> | ||
<jdkHome>${JDK9_HOME}</jdkHome> | ||
</configuration> | ||
</toolchain> | ||
</toolchains> |