File tree Expand file tree Collapse file tree 3 files changed +56
-2
lines changed
src/main/java/org/utplsql/api Expand file tree Collapse file tree 3 files changed +56
-2
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ before_deploy:
55
55
56
56
deploy :
57
57
- provider : script
58
- script : mvn clean deploy -DskipTests=true -B -U
58
+ script : mvn clean deploy -DskipTests=true -B -U -DtravisBuildNumber=$TRAVIS_BUILD_NUMBER
59
59
skip_cleanup : true
60
60
on :
61
61
repository : utPLSQL/utPLSQL-java-api
@@ -64,7 +64,7 @@ deploy:
64
64
condition : " ${TRAVIS_JOB_NUMBER} =~ \\ .1$"
65
65
66
66
- provider : script
67
- script : mvn clean deploy -DskipTests=true -B -U
67
+ script : mvn clean deploy -DskipTests=true -B -U -DtravisBuildNumber=$TRAVIS_BUILD_NUMBER
68
68
skip_cleanup : true
69
69
on :
70
70
repository : utPLSQL/utPLSQL-java-api
Original file line number Diff line number Diff line change 20
20
<coverage .resources.version>1.0.1</coverage .resources.version>
21
21
<coverage .resources.zip.directory>utPLSQL-coverage-html-${coverage.resources.version} </coverage .resources.zip.directory>
22
22
<coverage .resources.zip>${coverage.resources.zip.directory} .zip</coverage .resources.zip>
23
+ <travisBuildNumber >local</travisBuildNumber >
23
24
</properties >
24
25
25
26
<dependencies >
128
129
</execution >
129
130
</executions >
130
131
</plugin >
132
+ <plugin >
133
+ <groupId >com.google.code.maven-replacer-plugin</groupId >
134
+ <artifactId >replacer</artifactId >
135
+ <version >1.5.3</version >
136
+ <executions >
137
+ <execution >
138
+ <id >replace-version-number</id >
139
+ <phase >generate-sources</phase >
140
+ <goals >
141
+ <goal >replace</goal >
142
+ </goals >
143
+ </execution >
144
+ </executions >
145
+ <configuration >
146
+ <basedir >${project.basedir} /src/main/java</basedir >
147
+ <includes >
148
+ <include >**/JavaApiVersionInfo.java</include >
149
+ </includes >
150
+ <preserveDir >true</preserveDir >
151
+ <replacements >
152
+ <replacement >
153
+ <token >MAVEN_PROJECT_NAME = ".*"</token >
154
+ <value >MAVEN_PROJECT_NAME = "${project.name} "</value >
155
+ </replacement >
156
+ <replacement >
157
+ <token >MAVEN_PROJECT_VERSION = ".*"</token >
158
+ <value >MAVEN_PROJECT_VERSION = "${project.version} "</value >
159
+ </replacement >
160
+ <replacement >
161
+ <token >BUILD_NO = ".*"</token >
162
+ <value >BUILD_NO = "${travisBuildNumber} "</value >
163
+ </replacement >
164
+ </replacements >
165
+ </configuration >
166
+ </plugin >
131
167
<plugin >
132
168
<artifactId >maven-resources-plugin</artifactId >
133
169
<version >2.6</version >
Original file line number Diff line number Diff line change
1
+ package org .utplsql .api ;
2
+
3
+ /** This class is getting updated automatically by the build process.
4
+ * Please do not update its constants manually cause they will be overwritten.
5
+ *
6
+ * @author pesse
7
+ */
8
+ public class JavaApiVersionInfo {
9
+
10
+ private static final String BUILD_NO = "123" ;
11
+ private static final String MAVEN_PROJECT_NAME = "utPLSQL-java-api" ;
12
+ private static final String MAVEN_PROJECT_VERSION = "3.1.1-SNAPSHOT" ;
13
+
14
+ public static String getVersion () {
15
+ return MAVEN_PROJECT_VERSION + "." + BUILD_NO ;
16
+ }
17
+
18
+ }
You can’t perform that action at this time.
0 commit comments