Skip to content

Commit

Permalink
Merge pull request Islandora-Devops#83 from emetsger/git-describe-ver…
Browse files Browse the repository at this point in the history
…sion

Version Docker images using `git describe` when no `version` is specified
  • Loading branch information
nigelgbanks authored Oct 15, 2020
2 parents 1f297ff + 56427a7 commit b935442
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
buildscript {
repositories {
gradlePluginPortal()
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}
dependencies {
classpath("ca.islandora:isle-gradle-docker-plugin:0.0.1")
classpath("com.palantir.gradle.gitversion:gradle-git-version:0.12.3")
}
}

allprojects {
apply(plugin = "com.palantir.git-version")
val gitVersion: groovy.lang.Closure<String> by extra
if (version == "unspecified" || version.toString().trim() == "") {
version = gitVersion()
}
}

apply(plugin = "ca.islandora.gradle.docker")
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
org.gradle.parallel=true
# Will be used as a tag to denote the images release.
# Will be used as a tag to denote the images release. If this property is empty or undefined, the version will be
# obtained by the output of git-describe.
version=0.0.1
# The project can be build with/without Buildkit for those on older versions of Docker earlier than '18.09' or who
# cannot use the 'overlay2' filesystem with Docker due to using an earlier kernel version than 4.0.
Expand Down

0 comments on commit b935442

Please sign in to comment.