forked from redpen-cc/redpen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.yml
27 lines (24 loc) · 1.19 KB
/
release.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
pipeline:
- name: Set Version
command: mvn versions:set -DnewVersion=$REDPEN_VERSION
- name: Add Files to the Next Changes
command: git add pom.xml; git add **/*.xml
- name: Commit Version Changes
command: git commit -m "Set version in pom.xml to $REDPEN_VERSION"
- name: Delopy to Sonatype
command: mvn clean deploy -DperformRelease --settings ~/.m2/settings.xml > /dev/null
- name: Create Release Tag
command: git tag -a redpen-$REDPEN_VERSION -m "RedPen release $REDPEN_VERSION"
- name: Flush Next Release Version Number
command: echo $REDPEN_VERSION | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d-SNAPSHOT", length($NF), ($NF+1)%(10^length($NF))); print}'
- name: Echo Next Version
command: echo __OUT["Flush Next Release Version Number"]
- name: Set next version
command: mvn versions:set -DnewVersion=__OUT["Flush Next Release Version Number"]
- name: Git Add
command: git add .
- name: Commit New Snapshot version
command: git commit -m "Update versions in pom.xml for next release"
# cleanup:
# - name: Remove temporary files
# command: git clean -f