mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 14:20:35 +01:00
Allow -DcommitId flag when building Pkl (#954)
This is to allow building Pkl in environments that don't have access to git.
This commit is contained in:
@@ -350,6 +350,8 @@ open class BuildInfo(private val project: Project) {
|
||||
|
||||
// could be `commitId: Provider<String> = project.provider { ... }`
|
||||
val commitId: String by lazy {
|
||||
// allow -DcommitId=abc123 for build environments that don't have git.
|
||||
System.getProperty("commitId").let { if (it != null) return@lazy it }
|
||||
// only run command once per build invocation
|
||||
if (project === project.rootProject) {
|
||||
val process =
|
||||
|
||||
Reference in New Issue
Block a user