mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
Adds way to force publishing version from command line (#43)
In case we need to do a recreation of an artifact for some reason, this makes it possible.
This commit is contained in:
committed by
Peter Johnson
parent
b55c604c0a
commit
23462ec7df
@@ -3,6 +3,19 @@ import org.gradle.internal.os.OperatingSystem
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'edu.wpi.first.wpilib.versioning.WPILibVersioningPlugin'
|
||||
|
||||
if (!hasProperty('releaseType')) {
|
||||
WPILibVersion {
|
||||
releaseType = 'dev'
|
||||
}
|
||||
}
|
||||
|
||||
def csVersion
|
||||
if (project.hasProperty("csPublishVersion")) {
|
||||
csVersion = project.csPublishVersion
|
||||
} else {
|
||||
csVersion = WPILibVersion.version
|
||||
}
|
||||
|
||||
def csFile = file("$buildDir/cscore.txt")
|
||||
|
||||
task outputVersions() {
|
||||
@@ -15,7 +28,7 @@ task outputVersions() {
|
||||
}
|
||||
|
||||
doLast {
|
||||
csFile.write WPILibVersion.version
|
||||
csFile.write csVersion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,12 +43,6 @@ if (project.buildArm) {
|
||||
project(':arm').build.dependsOn outputVersions
|
||||
}
|
||||
|
||||
if (!hasProperty('releaseType')) {
|
||||
WPILibVersion {
|
||||
releaseType = 'dev'
|
||||
}
|
||||
}
|
||||
|
||||
// We change what repo we publish to depending on whether this is a development, beta, stable, or full
|
||||
// release. This is set up in the main gradle file.
|
||||
publishing {
|
||||
@@ -69,7 +76,7 @@ publishing {
|
||||
|
||||
groupId 'edu.wpi.cscore.java'
|
||||
artifactId 'cscore'
|
||||
version WPILibVersion.version
|
||||
version csVersion
|
||||
}
|
||||
}
|
||||
cpp(MavenPublication) {
|
||||
@@ -91,7 +98,7 @@ publishing {
|
||||
|
||||
groupId 'edu.wpi.cscore.cpp'
|
||||
artifactId 'cscore'
|
||||
version WPILibVersion.version
|
||||
version csVersion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user