Skip to content

Commit

Permalink
Feature/auto create git tag (#50)
Browse files Browse the repository at this point in the history
* added a job to yaml to auto create a new tag when running on master
  • Loading branch information
HoodElliot authored and JChrist committed May 7, 2019
1 parent 32d618a commit ca83c90
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 deletions.
3 changes: 3 additions & 0 deletions VersionFromPom.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
version=$(grep version pom.xml | grep -v '<?xml' | grep '<version>'|head -n 1|awk '{print $1}'| cut -d'>' -f 2 | cut -d'<' -f 1)
echo "##vso[task.setvariable variable=version]$version"
17 changes: 17 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,20 @@ jobs:
publishJUnitResults: true
testResultsFiles: '**/surefire-reports/TEST-*.xml'
goals: 'verify -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true --batch-mode --show-version -Ddocker.username=$(DOCKER_HUB_USER) -Ddocker.password=$(DOCKER_HUB_PASS) docker:push'

- job: createTag
dependsOn: ifBranchIsMaster
condition: succeeded()
steps:
- task: Bash@3
inputs:
targetType: 'filePath'
filePath: 'VersionFromPom.sh'
- task: GitHubRelease@0
displayName: ‘Create GitHub Release’
inputs:
gitHubConnection: $(GITHUB_ACCOUNT)
repositoryName: cytechmobile/reminderbot
action: create
tag: $(version)
tagSource: 'manual'
16 changes: 8 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
<groupId>gr.cytech</groupId>
<artifactId>chatreminderbot</artifactId>
<name>Chat Reminder Bot</name>
<version>1.13.0</version>
<version>1.14.0</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<surefire-plugin.version>3.0.0-M3</surefire-plugin.version>

<quarkus.version>0.12.0</quarkus.version>
<quarkus.version>0.14.0</quarkus.version>
<prettytime.version>4.0.2.Final</prettytime.version>
<google.api.client.version>1.27.0</google.api.client.version>
<google.api.client.version>1.28.0</google.api.client.version>
<guava.version>27.1-jre</guava.version>

<junit.version>5.3.2</junit.version>
<assertj.version>3.11.1</assertj.version>
<mockito.version>2.24.0</mockito.version>
<junit.version>5.4.2</junit.version>
<assertj.version>3.12.0</assertj.version>
<mockito.version>2.27.0</mockito.version>
</properties>
<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -53,7 +53,6 @@
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-flyway</artifactId>
<version>0.13.3</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -130,7 +129,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.17</version>
<version>8.20</version>
</dependency>
</dependencies>
<executions>
Expand Down Expand Up @@ -186,6 +185,7 @@
<environmentVariables>
<!--suppress UnresolvedMavenProperty -->
<DB_HOST>${docker.container.wa.ip}</DB_HOST>
<!--suppress UnresolvedMavenProperty -->
<APP_HOST>${docker.container.reminderbot.ip}</APP_HOST>
</environmentVariables>
</configuration>
Expand Down

0 comments on commit ca83c90

Please sign in to comment.