mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 17:10:27 +00:00
[stage]
This commit is contained in:
parent
1ca8b6ef3d
commit
fb669ed63e
1 changed files with 5 additions and 1 deletions
|
@ -88,7 +88,6 @@ project.ext {
|
|||
arch = getArchName()
|
||||
privateExtensions = file("$rootDir/private_extensions.txt").exists() ? file("$rootDir/private_extensions.txt").readLines() : []
|
||||
isFullRelease = System.getenv('RELEASE') != null && Boolean.parseBoolean(System.getenv('RELEASE'))
|
||||
isPreRelease = System.getenv('PRERELEASE') != null && Boolean.parseBoolean(System.getenv('PRERELEASE'))
|
||||
isStage = System.getenv('STAGE') != null && Boolean.parseBoolean(System.getenv('STAGE'))
|
||||
rawVersion = file('version').text.trim()
|
||||
versionString = rawVersion + (isFullRelease || isStage ? '' : '-SNAPSHOT')
|
||||
|
@ -159,6 +158,11 @@ if (isFullRelease && rawVersion.contains("-")) {
|
|||
throw new IllegalArgumentException("Releases must have canonical versions")
|
||||
}
|
||||
|
||||
|
||||
if (isStage && !rawVersion.contains("-")) {
|
||||
throw new IllegalArgumentException("Stage releases must have release numbers")
|
||||
}
|
||||
|
||||
def replaceVariablesInFileAsString(String f, Map<String, String> replacements) {
|
||||
def fileName = file(f).getName()
|
||||
def text = file(f).text
|
||||
|
|
Loading…
Reference in a new issue