@@ -710,7 +710,7 @@ object ci extends Module {
710
710
val launcherScript = os.read(standaloneLauncherPath)
711
711
val scalaCliVersionRegex = " SCALA_CLI_VERSION=\" .*\" " .r
712
712
val updatedLauncherScript =
713
- scalaCliVersionRegex.replaceFirstIn(launcherScript, s " SCALA_CLI_VERSION= $version" )
713
+ scalaCliVersionRegex.replaceFirstIn(launcherScript, s """ SCALA_CLI_VERSION=" $version" "" " )
714
714
os.write.over(standaloneLauncherPath, updatedLauncherScript)
715
715
716
716
val launcherWindowsScript = os.read(standaloneWindowsLauncherPath)
@@ -771,6 +771,33 @@ object ci extends Module {
771
771
772
772
commitChanges(s " Update for $version" , branch, homebrewFormulaDir)
773
773
}
774
+ def updateInstallationScript () = T .command {
775
+ val version = cli.publishVersion()
776
+
777
+ val targetDir = os.pwd / " target"
778
+ val packagesDir = targetDir / " scala-cli-packages"
779
+ val installationScriptPath = packagesDir / " scala-setup.sh"
780
+
781
+ // clean target directory
782
+ if (os.exists(targetDir)) os.remove.all(targetDir)
783
+
784
+ os.makeDir.all(targetDir)
785
+
786
+ val branch = " master"
787
+ val repo = s " [email protected] :Virtuslab/scala-cli-packages.git"
788
+
789
+ // Cloning
790
+ gitClone(repo, branch, targetDir)
791
+ setupGithubRepo(packagesDir)
792
+
793
+ val installationScript = os.read(installationScriptPath)
794
+ val scalaCliVersionRegex = " SCALA_CLI_VERSION=\" .*\" " .r
795
+ val updatedInstallationScript =
796
+ scalaCliVersionRegex.replaceFirstIn(installationScript, s """ SCALA_CLI_VERSION=" $version" """ )
797
+ os.write.over(installationScriptPath, updatedInstallationScript)
798
+
799
+ commitChanges(s " Update installation script for $version" , branch, packagesDir)
800
+ }
774
801
def updateDebianPackages () = T .command {
775
802
val version = cli.publishVersion()
776
803
0 commit comments