Skip to content

Commit b5da270

Browse files
committed
make assembly version dynamic.
1 parent 2502c7f commit b5da270

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<project xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd' xmlns='http://maven.apache.org/POM/4.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
33
<modelVersion>4.0.0</modelVersion>
44

55
<groupId>com.zerosumtech.wparad.stash</groupId>
66
<artifactId>stash-http-request-trigger</artifactId>
7-
<version>1.5.14</version>
7+
<version>0.0.0.0</version>
88

99
<scm>
1010
<connection>scm:git:ssh://[email protected]:wparad/stash-http-request-trigger.git</connection>
@@ -172,7 +172,7 @@
172172
</goals>
173173
</pluginExecutionFilter>
174174
<action>
175-
<ignore />
175+
<ignore/>
176176
</action>
177177
</pluginExecution>
178178
</pluginExecutions>

rakefile.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
require 'json'
66
require 'net/http'
77
require 'rest-client'
8+
require 'rexml/document'
89
require 'travis-build-tools'
910

1011
#Constants
@@ -63,11 +64,18 @@ def download_file(local_path, remote_location)
6364
end
6465
end
6566

66-
task :build do
67+
task :build => [:fix_pom_version] do
6768
script = Dir[File.join(ATLASSIAN_TOOLS_DIR, "**", 'atlas-package')].first
6869
puts %x[#{script}]
6970
end
7071

72+
task :fix_pom_version do
73+
pom_xml = File.join(PWD, 'pom.xml')
74+
document = REXML::Document.new(File.new(pom_xml))
75+
document.root.elements['version'].text = TravisBuildTools::Build::VERSION.to_s
76+
File.write(pom_xml, document.to_s)
77+
end
78+
7179
publish_git_tag :publish_git_tag do |t, args|
7280
t.git_repository = %x[git config --get remote.origin.url].split('://')[1]
7381
t.tag_name = TravisBuildTools::Build::VERSION

0 commit comments

Comments
 (0)