Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ then
set -x
$MVN -B clean release:prepare -DreleaseVersion=$RELEASE_VERSION
$MVN release:perform
git push
set +x
elif [[ $TRAVIS_BRANCH == "master" ]]
then
Expand Down
34 changes: 34 additions & 0 deletions build/build_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash
set -e # Any subsequent(*) commands which fail will cause the shell script to exit immediately

LOGBACK_CONFIG="-Dlogback.configurationFile=file://$BUILD_DIR/logback-ci.xml"
MVN="mvn --settings build/settings.xml -Drelease.arguments="$LOGBACK_CONFIG" $LOGBACK_CONFIG org.jacoco:jacoco-maven-plugin:prepare-agent "


openssl aes-256-cbc -pass pass:$ENCRYPTION_PASSWORD -in $BUILD_DIR/pubring.gpg.enc -out $BUILD_DIR/pubring.gpg -d
openssl aes-256-cbc -pass pass:$ENCRYPTION_PASSWORD -in $BUILD_DIR/secring.gpg.enc -out $BUILD_DIR/secring.gpg -d
openssl aes-256-cbc -pass pass:$ENCRYPTION_PASSWORD -in $BUILD_DIR/deploy_key.pem.enc -out $BUILD_DIR/deploy_key.pem -d

echo "Performing a release..."

eval "$(ssh-agent -s)"
chmod 600 $BUILD_DIR/deploy_key.pem
ssh-add $BUILD_DIR/deploy_key.pem
git config --global user.name "TraneIO CI"
git config --global user.email "ci@trane.io"
git config --global push.default matching
git remote set-url origin git@github.com:traneio/ndbc.git

#git fetch --unshallow
#git checkout master || git checkout -b master
#git reset --hard origin/master

#git rm release.version
#git commit -m "[skip ci] [release] remove release.version"
#git push

set -x
$MVN -B clean release:prepare release:perform
git push

set +x
12 changes: 8 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@
</execution>
</executions>
</plugin>
<!-- plugin> <groupId>net.revelc.code.formatter</groupId> <artifactId>formatter-maven-plugin</artifactId>
<version>2.7.4</version> <configuration> <lineEnding>LF</lineEnding> <configFile>${project.basedir}/eclipse-formatter-config.xml</configFile>
</configuration> <executions> <execution> <goals> <goal>format</goal> </goals>
<!-- plugin> <groupId>net.revelc.code.formatter</groupId> <artifactId>formatter-maven-plugin</artifactId>
<version>2.7.4</version> <configuration> <lineEnding>LF</lineEnding> <configFile>${project.basedir}/eclipse-formatter-config.xml</configFile>
</configuration> <executions> <execution> <goals> <goal>format</goal> </goals>
</execution> </executions> </plugin -->
</plugins>
</build>
Expand All @@ -146,6 +146,10 @@
<configuration>
<scmCommentPrefix>[skip ci] [release] </scmCommentPrefix>
<arguments>${release.arguments}</arguments>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>
<plugin>
Expand All @@ -170,7 +174,7 @@
<configuration>
<serverId>ossrh-releases</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
Expand Down