mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 05:25:50 +01:00
generate sha256 checksum
This commit is contained in:
@@ -139,8 +139,14 @@ executableKey := {
|
|||||||
val outputFile = workDir / warName
|
val outputFile = workDir / warName
|
||||||
IO jar (contentMappings, outputFile, manifest)
|
IO jar (contentMappings, outputFile, manifest)
|
||||||
|
|
||||||
|
// patch ChecksumHelper to allow sha256
|
||||||
|
val hack = classOf[ChecksumHelper] getDeclaredField "algorithms"
|
||||||
|
hack setAccessible true
|
||||||
|
val algos = (hack get null).asInstanceOf[java.util.Map[String,String]]
|
||||||
|
algos put ("sha256", "SHA-256")
|
||||||
|
|
||||||
// generate checksums
|
// generate checksums
|
||||||
Seq("md5", "sha1") foreach { algorithm =>
|
Seq("md5", "sha1", "sha256") foreach { algorithm =>
|
||||||
IO.write(
|
IO.write(
|
||||||
workDir / (warName + "." + algorithm),
|
workDir / (warName + "." + algorithm),
|
||||||
ChecksumHelper computeAsString (outputFile, algorithm)
|
ChecksumHelper computeAsString (outputFile, algorithm)
|
||||||
|
|||||||
Reference in New Issue
Block a user