mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-23 02:55:19 +01:00
Use snapshot repo for snapshot versions
This commit is contained in:
parent
4fc10b702e
commit
8d04785e3a
@ -73,7 +73,10 @@ publishing {
|
||||
repositories {
|
||||
maven {
|
||||
name = "bluecolored"
|
||||
url = uri( "https://repo.bluecolored.de/releases" )
|
||||
url = uri("https://repo.bluecolored.de/releases")
|
||||
|
||||
if (!gitIsRelease())
|
||||
url = uri("https://repo.bluecolored.de/snapshots")
|
||||
|
||||
credentials {
|
||||
username = project.findProperty("bluecoloredUsername") as String? ?: System.getenv("BLUECOLORED_USERNAME")
|
||||
|
@ -24,6 +24,12 @@ fun Project.gitVersion(): String {
|
||||
return gitVersion
|
||||
}
|
||||
|
||||
fun Project.gitIsRelease(): Boolean {
|
||||
val lastTag = if (runCommand("git tag", "").isEmpty()) "" else runCommand("git describe --tags --abbrev=0", "")
|
||||
val commits = runCommand("git rev-list --count $lastTag..HEAD", "0")
|
||||
return commits == "0" && gitClean()
|
||||
}
|
||||
|
||||
fun Project.releaseNotes(): String {
|
||||
val file = rootProject.projectDir.resolve("release.md")
|
||||
if (!file.exists()) return ""
|
||||
|
Loading…
Reference in New Issue
Block a user