Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,14 @@ object Build {
val currentDate =
formatter.format(java.time.ZonedDateTime.now(java.time.ZoneId.of("UTC")))
s"${baseVersion}-bin-${currentDate}-${VersionUtil.gitHash}-NIGHTLY"
} else if (isBenchmark) {
s"${baseVersion}-bin-${VersionUtil.gitHashFull}-BENCH"
}
else s"${baseVersion}-bin-SNAPSHOT"
}
def isRelease = sys.env.get("RELEASEBUILD").contains("yes")
def isNightly = sys.env.get("NIGHTLYBUILD").contains("yes")
def isBenchmark = sys.env.get("BENCHMARKBUILD").contains("yes")

/** Version calculate for `nonbootstrapped` projects */
val dottyNonBootstrappedVersion = {
Expand Down
3 changes: 3 additions & 0 deletions project/VersionUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ object VersionUtil {
new JGit(repo)
}

/** Full SHA hash of the current commit */
def gitHashFull: String = git.headCommitSha

/** Seven letters of the SHA hash is considered enough to uniquely identify a
* commit, albeit extremely large projects - such as the Linux kernel - need
* more letters to stay unique
Expand Down
Loading