-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcircle.yml
36 lines (31 loc) · 1.42 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
version: 2
jobs:
build:
working_directory: ~/example
docker:
- image: lightjason/examples:latest
branches:
ignore:
- master
- /dev-.*/
environment:
TZ: "/usr/share/zoneinfo/Europe/Berlin"
steps:
- checkout
- run:
name: Git Clean
command: git clean -xdf && git fetch -p && git gc --prune=now
- run:
name: Maven Clean
command: mvn clean dependency:purge-local-repository -Dexclude="org.lightjason:agentspeak" -DreResolve=false -DactTransitively=true
- run:
name: Build
command: mvn package -Dbuild.number=${CIRCLE_BUILD_NUM} -Dbuild.commit=${CIRCLE_SHA1}
- run:
name: Github Release
command: |
if [ ! -z "$GITHUBTOKEN" ]; then
export FILENAME=$(mvn -B help:evaluate -Dexpression=project.build.finalName | grep -vi info | grep -ivvv "warning" )
export TAG=$((CIRCLE_BUILD_NUM / 1000)).$((CIRCLE_BUILD_NUM / 100 % 10)).$((CIRCLE_BUILD_NUM % 100))
ghr -t $GITHUBTOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME -c $CIRCLE_SHA1 -b "$(git log -1 $CIRCLE_SHA1 --pretty=format:%s)" $CIRCLE_BRANCH-v$TAG target/$FILENAME.jar
fi