Skip to content

Commit

Permalink
Fix layout of released SDK archives, restore top-level directory `sca…
Browse files Browse the repository at this point in the history
…la3-{{ scala-version }}`
  • Loading branch information
WojciechMazur committed Dec 12, 2024
1 parent 7441791 commit f44e12d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -801,19 +801,16 @@ jobs:
distDir="$3"
# Build binaries
./project/scripts/sbt "${sbtProject}/Universal/stage"
./project/scripts/sbt "all ${sbtProject}/Universal/packageBin ${sbtProject}/Universal/packageZipTarball"
outputPath="${distDir}/target/universal/stage"
artifactName="scala3-${{ env.RELEASE_TAG }}${distroSuffix}"
zipArchive="${artifactName}.zip"
tarGzArchive="${artifactName}.tar.gz"
cwd=$(pwd)
(cd $outputPath && zip -r ${zipArchive} . && mv ${zipArchive} "${cwd}/")
tar -czf ${tarGzArchive} -C "$outputPath" .
# Caluclate SHA for each of archive files
for file in "${zipArchive}" "${tarGzArchive}"; do
mv $outputPath/$file $file
sha256sum "${file}" > "${file}.sha256"
done
}
Expand Down
9 changes: 8 additions & 1 deletion project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2257,7 +2257,14 @@ object Build {
// ========
Universal / stage := (Universal / stage).dependsOn(republish).value,
Universal / packageBin := (Universal / packageBin).dependsOn(republish).value,
Universal / packageZipTarball := (Universal / packageZipTarball).dependsOn(republish).value,
Universal / packageZipTarball := (Universal / packageZipTarball).dependsOn(republish)
.map { archiveFile =>
// Rename .tgz to .tar.gz for consistency with previous versions
val renamedFile = archiveFile.getParentFile() / archiveFile.getName.replaceAll("\\.tgz$", ".tar.gz")
IO.move(archiveFile, renamedFile)
renamedFile
}
.value,
// ========
Universal / mappings ++= directory(dist.base / "bin"),
Universal / mappings ++= directory(republishRepo.value / "maven2"),
Expand Down

0 comments on commit f44e12d

Please sign in to comment.