Skip to content

Commit

Permalink
try to provide version via -P
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-Bergmann committed Apr 7, 2023
1 parent 1a60aaf commit c50ee91
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ jobs:
env:
JAVA_OPTS: "-Xmx1024M"
GRADLE_OPTS: "-Dorg.gradle.daemon=true"
run: ./gradlew test build -s
run: ./gradlew -Pversion=${{ github.ref_name }}-SNAPSHOT test build -s
- name: Post Build
run: rm -f $HOME/.gradle/gradle.properties
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ jobs:
env:
JAVA_OPTS: "-Xmx1024M"
GRADLE_OPTS: "-Dorg.gradle.daemon=true"
run: ./gradlew -PrunOnCI=true test build :publishIntershopMvnPublicationToMavenRepository -s
run: ./gradlew -Pversion=${{ github.ref_name }} -PrunOnCI=true test build :publishIntershopMvnPublicationToMavenRepository -s
- name: Post Build
run: rm -f $HOME/.gradle/gradle.properties
20 changes: 2 additions & 18 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,31 +33,15 @@ plugins {
// artifact signing - necessary on Maven Central
signing

// intershop version plugin
id("com.intershop.gradle.scmversion") version "6.2.0"

id("com.dorongold.task-tree") version "2.1.0"
}

scm {
version {
type = "threeDigits"
initialVersion = "1.0.0"
}
}

// release configuration
group = "com.intershop.version"
description = "semantic version"

// IMPORTANT version referenced at README.md, adapt it there
version = scm.version.version
// IMPORTANT version referenced at README.md, adapt it there

// set correct project status
if (project.version.toString().endsWith("-SNAPSHOT")) {
status = "snapshot"
}
// IMPORTANT will be set by -Pversion=${{ github.ref_name }}
version = "1.0.0"

val sonatypeUsername: String? by project
val sonatypePassword: String? by project
Expand Down

0 comments on commit c50ee91

Please sign in to comment.