mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-04 20:45:58 +01:00
generate sha256 checksum
This commit is contained in:
@@ -139,8 +139,14 @@ executableKey := {
|
||||
val outputFile = workDir / warName
|
||||
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
|
||||
Seq("md5", "sha1") foreach { algorithm =>
|
||||
Seq("md5", "sha1", "sha256") foreach { algorithm =>
|
||||
IO.write(
|
||||
workDir / (warName + "." + algorithm),
|
||||
ChecksumHelper computeAsString (outputFile, algorithm)
|
||||
|
||||
Reference in New Issue
Block a user