Add nightly builds - version bump to 0.3

This commit is contained in:
Maschell 2019-04-26 21:16:29 +02:00
parent f51b9b7282
commit f172151030
3 changed files with 110 additions and 19 deletions

60
.circleci/config.yml Normal file
View File

@ -0,0 +1,60 @@
# Java Maven CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/openjdk:8-jdk
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4
working_directory: ~/repo
environment:
# Customize the JVM maximum heap limit
MAVEN_OPTS: -Xmx3200m
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "pom.xml" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
command: |
mvn dependency:go-offline
sudo apt-get update
sudo apt-get -y upgrade
wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz
sudo tar -xvf go1.10.linux-amd64.tar.gz
sudo mv go /usr/local
- save_cache:
paths:
- ~/.m2
key: v1-dependencies-{{ checksum "pom.xml" }}
- run: mvn package -Dci-build=true
- deploy:
name: Deploy
command: |
mkdir ~/go
export GOPATH=~/go
export GOROOT=/usr/local/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
go get github.com/tcnksm/ghr
ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME -prerelease -b 'Nightly release - Use caution!' `echo "v0.3-nightly-$(git rev-parse --short=7 HEAD)"` ci/
- store_artifacts:
path: ci/

View File

@ -112,7 +112,7 @@ java -jar JWUDTool.jar -in "game_part1.wud" -decryptFile /content/Sound/.*
```
## Compiling
`clean assembly:single package`
`mvn clean package`
## Credits
Maschell

67
pom.xml
View File

@ -4,40 +4,71 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.mas</groupId>
<artifactId>jwudtool</artifactId>
<version>0.2a</version>
<version>0.3</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<profiles>
<profile>
<id>normal-build</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<jar_dir>./target</jar_dir>
</properties>
</profile>
<profile>
<id>ci-build</id>
<activation>
<property>
<name>ci-build</name>
<value>true</value>
</property>
</activation>
<properties>
<jar_dir>./ci</jar_dir>
</properties>
</profile>
</profiles>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>de.mas.jwudtool.Main</mainClass>
</manifest>
</archive>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<id>make-assembly</id>
<configuration>
<archive>
<manifest>
<mainClass>de.mas.jwudtool.Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<!-- Stick jar in root dir, if you want -->
<outputDirectory>${jar_dir}</outputDirectory>
<finalName>JWUDTool-${project.version}-nightly</finalName>
</configuration>
<phase>package</phase>
<goals>
<goal>single</goal>
<goal>attached</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>jitpack.io</id> <!-- JitPack allows github repo to be used as a maven repo -->