mirror of
https://github.com/apple/pkl.git
synced 2026-06-07 14:22:49 +02: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 { ... }`
|
// could be `commitId: Provider<String> = project.provider { ... }`
|
||||||
val commitId: String by lazy {
|
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
|
// only run command once per build invocation
|
||||||
if (project === project.rootProject) {
|
if (project === project.rootProject) {
|
||||||
val process =
|
val process =
|
||||||
|
|||||||
Reference in New Issue
Block a user