Use unix timestamp instead of pipeline ID
This commit is contained in:
parent
b6d9066c07
commit
8b121cda69
|
@ -14,11 +14,11 @@ stages:
|
|||
build_test:
|
||||
stage: build
|
||||
script:
|
||||
- gradle --build-cache build publish -Pflavor=nogui -Ppublic -Ppipeline=$CI_PIPELINE_ID
|
||||
- gradle --build-cache build publish -Pflavor=fat -Ppublic -Ppipeline=$CI_PIPELINE_ID
|
||||
- gradle --build-cache build publish -Pflavor=windows -Ppublic -Ppipeline=$CI_PIPELINE_ID
|
||||
- gradle --build-cache build publish -Pflavor=linux -Ppublic -Ppipeline=$CI_PIPELINE_ID
|
||||
- gradle --build-cache build publish -Pflavor=macos -Ppublic -Ppipeline=$CI_PIPELINE_ID
|
||||
- gradle --build-cache build publish -Pflavor=nogui -Ppublic
|
||||
- gradle --build-cache build publish -Pflavor=fat -Ppublic
|
||||
- gradle --build-cache build publish -Pflavor=windows -Ppublic
|
||||
- gradle --build-cache build publish -Pflavor=linux -Ppublic
|
||||
- gradle --build-cache build publish -Pflavor=macos -Ppublic
|
||||
- cp build/libs/*-*-*.jar ./
|
||||
- cp wrapper/build/libs/* build/libs/
|
||||
- cp wrapper/build/libs/*.exe wrapper.exe
|
||||
|
@ -72,8 +72,8 @@ deploy:
|
|||
- if: $CI_COMMIT_TAG && '$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME =~ /^master/'
|
||||
stage: deploy
|
||||
script:
|
||||
- gradle --build-cache build publish -Pflavor=nogui -Ppublic
|
||||
- gradle --build-cache build publish -Pflavor=fat -Ppublic
|
||||
- gradle --build-cache build publish -Pflavor=windows -Ppublic
|
||||
- gradle --build-cache build publish -Pflavor=linux -Ppublic
|
||||
- gradle --build-cache build publish -Pflavor=macos -Ppublic
|
||||
- gradle --build-cache build publish -Pflavor=nogui -Ppublic -Prelease
|
||||
- gradle --build-cache build publish -Pflavor=fat -Ppublic -Prelease
|
||||
- gradle --build-cache build publish -Pflavor=windows -Ppublic -Prelease
|
||||
- gradle --build-cache build publish -Pflavor=linux -Ppublic -Prelease
|
||||
- gradle --build-cache build publish -Pflavor=macos -Ppublic -Prelease
|
||||
|
|
|
@ -16,7 +16,7 @@ repositories {
|
|||
}
|
||||
|
||||
allprojects {
|
||||
version "$project.ver" + (project.hasProperty('pipeline') ? "-" + project.getProperty('pipeline') : "")
|
||||
version "$project.ver" + (project.hasProperty('release') ? "" : "-" + Instant.now().getEpochSecond())
|
||||
group 'io.gitlab.jfronny.inceptum'
|
||||
}
|
||||
|
||||
|
|
|
@ -2,15 +2,15 @@ package io.gitlab.jfronny.inceptum.model;
|
|||
|
||||
public class ComparableVersion implements Comparable<ComparableVersion> {
|
||||
private final String string;
|
||||
private final int[] numbers;
|
||||
private final long[] numbers;
|
||||
|
||||
public ComparableVersion(String string) {
|
||||
this.string = string;
|
||||
String[] split = string.split("[.+-]+");
|
||||
this.numbers = new int[split.length];
|
||||
this.numbers = new long[split.length];
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
try {
|
||||
numbers[i] = Integer.parseInt(split[i]);
|
||||
numbers[i] = Long.parseLong(split[i]);
|
||||
} catch (NumberFormatException e) {
|
||||
throw new IllegalArgumentException("Failed to parse version string.");
|
||||
}
|
||||
|
@ -26,8 +26,8 @@ public class ComparableVersion implements Comparable<ComparableVersion> {
|
|||
public int compareTo(ComparableVersion version) {
|
||||
final int maxLength = Math.max(numbers.length, version.numbers.length);
|
||||
for (int i = 0; i < maxLength; i++) {
|
||||
final int left = i < numbers.length ? numbers[i] : 0;
|
||||
final int right = i < version.numbers.length ? version.numbers[i] : 0;
|
||||
final long left = i < numbers.length ? numbers[i] : 0;
|
||||
final long right = i < version.numbers.length ? version.numbers[i] : 0;
|
||||
if (left != right) {
|
||||
return left < right ? -1 : 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue