[Git][java-team/gversion-plugin][master] 6 commits: New upstream version 1.5.2+dfsg
Andrius Merkys
gitlab at salsa.debian.org
Fri Sep 13 10:55:40 BST 2019
Andrius Merkys pushed to branch master at Debian Java Maintainers / gversion-plugin
Commits:
cba8a615 by Andrius Merkys at 2019-09-13T09:03:33Z
New upstream version 1.5.2+dfsg
- - - - -
1b1f7570 by Andrius Merkys at 2019-09-13T09:03:33Z
Update upstream source from tag 'upstream/1.5.2+dfsg'
Update to upstream version '1.5.2+dfsg'
with Debian dir 946bc47e0841cf64f7c9a09f337abd805e9e5973
- - - - -
6f2045c9 by Andrius Merkys at 2019-09-13T09:03:52Z
Packaging new release.
- - - - -
c96406a4 by Andrius Merkys at 2019-09-13T09:04:29Z
Refresing remove-plugin-publish-plugin.patch.
- - - - -
eafd22c0 by Andrius Merkys at 2019-09-13T09:07:32Z
Adding a patch to remove the dependency on unpackaged junit-jupiter.
- - - - -
37d4fbe4 by Andrius Merkys at 2019-09-13T09:13:24Z
Adding a patch description.
- - - - -
8 changed files:
- build.gradle
- change.md
- debian/changelog
- + debian/patches/remove-junit-jupiter.patch
- debian/patches/remove-plugin-publish-plugin.patch
- debian/patches/series
- src/main/groovy/com/peterabeles/GVersion.groovy
- + src/test/groovy/com/peterabeles/TestGVersion.java
Changes:
=====================================
build.gradle
=====================================
@@ -3,7 +3,7 @@ apply plugin: 'maven'
apply plugin: "com.gradle.plugin-publish"
group = 'com.peterabeles.gversion'
-version = '1.5.0'
+version = '1.5.2'
project.archivesBaseName = 'gversion'
@@ -31,6 +31,13 @@ repositories {
dependencies {
compile gradleApi()
compile localGroovy()
+
+ testImplementation(
+ 'org.junit.jupiter:junit-jupiter-api:5.4.0'
+ )
+ testRuntimeOnly(
+ 'org.junit.jupiter:junit-jupiter-engine:5.4.0'
+ )
}
task wrapper(type: Wrapper) {
=====================================
change.md
=====================================
@@ -1,3 +1,11 @@
+## 1.5.2
+
+- Fixed issue when git has a longer version
+
+## 1.5.1
+
+- Java creates a private constructor to hide implicit public one
+
## 1.5
- Changes to file path
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+gversion-plugin (1.5.2+dfsg-1) unstable; urgency=medium
+
+ * New upstream version 1.5.2+dfsg
+
+ -- Andrius Merkys <merkys at debian.org> Fri, 13 Sep 2019 05:03:40 -0400
+
gversion-plugin (1.5.0+dfsg-2) unstable; urgency=medium
* Executing tests during build.
=====================================
debian/patches/remove-junit-jupiter.patch
=====================================
@@ -0,0 +1,46 @@
+Description: Removing unpackaged test plugin.
+Author: Andrius Merkys <merkys at debian.org>
+--- a/build.gradle
++++ b/build.gradle
+@@ -27,13 +27,6 @@
+ dependencies {
+ compile gradleApi()
+ compile localGroovy()
+-
+- testImplementation(
+- 'org.junit.jupiter:junit-jupiter-api:5.4.0'
+- )
+- testRuntimeOnly(
+- 'org.junit.jupiter:junit-jupiter-engine:5.4.0'
+- )
+ }
+
+ task wrapper(type: Wrapper) {
+--- a/src/test/groovy/com/peterabeles/TestGVersion.java
++++ /dev/null
+@@ -1,24 +0,0 @@
+-package com.peterabeles;
+-
+-import org.junit.jupiter.api.Test;
+-
+-import static org.junit.jupiter.api.Assertions.assertEquals;
+-
+-/**
+- * @author Peter Abeles
+- */
+-class TestGVersion {
+- @Test
+- void git_version() {
+- check(2,17,1,GVersion.parseGitVersion("git version 2.17.1"));
+- check(1,7,10,GVersion.parseGitVersion("git version 1.7.10.4"));
+- check(1,7,0,GVersion.parseGitVersion("git version 1.7"));
+- check(1,0,0,GVersion.parseGitVersion("git version 1"));
+- }
+-
+- private void check(int a, int b , int c , int[] version ) {
+- assertEquals(a,version[0]);
+- assertEquals(b,version[1]);
+- assertEquals(c,version[2]);
+- }
+-}
+\ No newline at end of file
=====================================
debian/patches/remove-plugin-publish-plugin.patch
=====================================
@@ -8,7 +8,7 @@ Author: Andrius Merkys <merkys at debian.org>
-apply plugin: "com.gradle.plugin-publish"
group = 'com.peterabeles.gversion'
- version = '1.5.0'
+ version = '1.5.2'
@@ -13,9 +12,6 @@
url "https://plugins.gradle.org/m2/"
}
@@ -19,7 +19,7 @@ Author: Andrius Merkys <merkys at debian.org>
}
repositories {
-@@ -37,17 +33,3 @@
+@@ -44,17 +40,3 @@
distributionType = Wrapper.DistributionType.BIN
gradleVersion = '4.10.2'
}
=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
remove-plugin-publish-plugin.patch
+remove-junit-jupiter.patch
=====================================
src/main/groovy/com/peterabeles/GVersion.groovy
=====================================
@@ -94,12 +94,12 @@ class GVersion implements Plugin<Project> {
return version
words = words[2].split("\\.")
- if( words.length != 3 )
+ if( words.length < 1 )
return version
- version[0] = Integer.parseInt(words[0])
- version[1] = Integer.parseInt(words[1])
- version[2] = Integer.parseInt(words[2])
+ for (int i = 0; i < Math.min(version.length,words.length); i++) {
+ version[i] = Integer.parseInt(words[i])
+ }
return version
}
@@ -261,7 +261,7 @@ class GVersion implements Plugin<Project> {
writer << "/**\n"
writer << " * Automatically generated file containing build version information.\n"
writer << " */\n"
- writer << "public class " + extension.className + " {\n"
+ writer << "public final class $extension.className {\n"
writer << "\tpublic static final String MAVEN_GROUP = \"$project.group\";\n"
writer << "\tpublic static final String MAVEN_NAME = \"$project.name\";\n"
writer << "\tpublic static final String VERSION = \"$project.version\";\n"
@@ -270,6 +270,8 @@ class GVersion implements Plugin<Project> {
writer << "\tpublic static final String GIT_DATE = \"$git_date\";\n"
writer << "\tpublic static final String BUILD_DATE = \"$date_string\";\n"
writer << "\tpublic static final long BUILD_UNIX_TIME = " + unix_time + "L;\n"
+ writer << "\n"
+ writer << "\tprivate $extension.className(){}\n" // hide implicit public constructor
writer << "}"
writer.flush()
writer.close()
=====================================
src/test/groovy/com/peterabeles/TestGVersion.java
=====================================
@@ -0,0 +1,24 @@
+package com.peterabeles;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+/**
+ * @author Peter Abeles
+ */
+class TestGVersion {
+ @Test
+ void git_version() {
+ check(2,17,1,GVersion.parseGitVersion("git version 2.17.1"));
+ check(1,7,10,GVersion.parseGitVersion("git version 1.7.10.4"));
+ check(1,7,0,GVersion.parseGitVersion("git version 1.7"));
+ check(1,0,0,GVersion.parseGitVersion("git version 1"));
+ }
+
+ private void check(int a, int b , int c , int[] version ) {
+ assertEquals(a,version[0]);
+ assertEquals(b,version[1]);
+ assertEquals(c,version[2]);
+ }
+}
\ No newline at end of file
View it on GitLab: https://salsa.debian.org/java-team/gversion-plugin/compare/c65ae452f867339bcaebb0ba335ef5c00fc22335...37d4fbe489c0a3c6b89779b44ccc1ba314f5162d
--
View it on GitLab: https://salsa.debian.org/java-team/gversion-plugin/compare/c65ae452f867339bcaebb0ba335ef5c00fc22335...37d4fbe489c0a3c6b89779b44ccc1ba314f5162d
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20190913/7f6d43af/attachment.html>
More information about the pkg-java-commits
mailing list