Skip to content

Commit

Permalink
Add the configuration for Chocolatey
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaremmal committed Jun 8, 2024
1 parent 04ada79 commit 0934b95
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<h1 align=center>Package Managers Configurations</h1>

The following folder contains the configuration files of all the package managers under the control of the scala organisation.

- [chocolatey](chocolatey): Configuration files for Chocolatey
10 changes: 10 additions & 0 deletions pkgs/chocolatey/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<h1 align=center>Configuration for Chocolatey</h1>

Official support for Chocolatey started by the release of Scala 3.5.0

> [!IMPORTANT]
> This folder contains the templates to generate the configuration for Chocolatey.
> The `scala.nuspec` and `chocolateyinstall.ps1` files needs to be rewritten by changing the following placeholders:
> - @LAUNCHER_VERSION@ : Placeholder for the current scala version to deploy
> - @LAUNCHER_URL@ : Placeholder for the URL to the msi released on GitHub
> - @LAUNCHER_SHA256@ : Placeholder for the SHA256 of the msi file released on GitHub
15 changes: 15 additions & 0 deletions pkgs/chocolatey/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$ErrorActionPreference = 'Stop';
$packageArgs = @{
packageName = 'scala'
fileType = 'MSI'
url64bit = '@LAUNCHER_URL@'

softwareName = 'Scala'
checksum64 = '@LAUNCHER_SHA256@'
checksumType64= 'sha256'

silentArgs = "/qn /norestart"
validExitCodes= @(0)
}

Install-ChocolateyPackage @packageArgs
25 changes: 25 additions & 0 deletions pkgs/chocolatey/scala.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>scala</id>
<version>@LAUNCHER_VERSION@</version>
<title>Scala</title>
<authors>scala</authors>
<owners>scala</owners>
<tags>scala</tags>
<summary>Scala</summary>
<description>Official release of the Scala Programming Language on Chocolatey.</description>
<packageSourceUrl>https://github.com/scala/scala3/tree/main/pkgs/chocolatey</packageSourceUrl>
<projectSourceUrl>https://github.com/scala/scala3</projectSourceUrl>
<projectUrl>https://scala-lang.org/</projectUrl>
<bugTrackerUrl>https://github.com/scala/scala3/issues</bugTrackerUrl>
<copyright>© 2002-2024, LAMP/EPFL</copyright>
<iconUrl>https://github.com/scala/scala3/tree/main/pkgs/chocolatey/logo.ico</iconUrl>
<licenseUrl>https://github.com/scala/scala3/blob/main/LICENSE</licenseUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<releaseNotes>https://github.com/scala/scala3/releases</releaseNotes>
</metadata>
<files>
<file src="tools\**" target="tools" />
</files>
</package>

0 comments on commit 0934b95

Please sign in to comment.