Skip to content

Commit 19fa509

Browse files
committed
Scala CLI package - set priority, section and maintainer
1 parent 8ea26df commit 19fa509

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

.github/scripts/generate-os-packages.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ generate_deb() {
4545
--source-app-path "$(launcher)" \
4646
--output "$ARTIFACTS_DIR/scala-cli.deb" \
4747
--description "Scala CLI" \
48-
--maintainer "Scala CLI" \
49-
--launcher-app "scala-cli"
48+
--maintainer "[email protected]" \
49+
--launcher-app "scala-cli" \
50+
--priority "optional" \
51+
--section "devel" \
5052
mv "$ARTIFACTS_DIR/scala-cli.deb" "$ARTIFACTS_DIR/scala-cli-x86_64-pc-linux.deb"
5153
}
5254

@@ -57,7 +59,7 @@ generate_rpm() {
5759
--source-app-path "$(launcher)" \
5860
--output "$ARTIFACTS_DIR/scala-cli-x86_64-pc-linux.rpm" \
5961
--description "Scala CLI" \
60-
--maintainer "Scala CLI" \
62+
--maintainer "[email protected]" \
6163
--license "ASL 2.0" \
6264
--launcher-app "scala-cli"
6365
}
@@ -84,7 +86,7 @@ generate_msi() {
8486
--source-app-path "$(launcher)" \
8587
--output "$ARTIFACTS_DIR/scala-cli-x86_64-pc-win32.msi" \
8688
--product-name "Scala CLI" \
87-
--maintainer "Scala CLI" \
89+
--maintainer "[email protected]" \
8890
--launcher-app "scala-cli" \
8991
--license-path "./LICENSE" \
9092
--exit-dialog "To run Scala CLI, open a Command window, and type scala-cli + Enter. If scala-cli cannot be found, ensure that the Command window was opened after Scala CLI was installed." \

modules/integration/src/test/scala/scala/cli/integration/NativePackagerTests.scala

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ class NativePackagerTests extends ScalaCliSuite {
116116

117117
testInputs.fromRoot { root =>
118118

119-
val appName = helloWorldFileName.stripSuffix(".scala").toLowerCase()
119+
val appName = helloWorldFileName.stripSuffix(".scala").toLowerCase()
120+
val priority = "optional"
121+
val section = "devel"
120122

121123
val destDir = os.rel / "package"
122124
os.makeDir.all(root / destDir)
@@ -127,7 +129,9 @@ class NativePackagerTests extends ScalaCliSuite {
127129
"--output", destDir / s"$appName.deb",
128130
"--maintainer", "scala-cli-test",
129131
"--description", "scala-cli-test",
130-
"--launcher-app", appName
132+
"--launcher-app", appName,
133+
"--priority", priority,
134+
"--section", section,
131135
)
132136
// format: on
133137
os.proc(cmd).call(
@@ -139,6 +143,11 @@ class NativePackagerTests extends ScalaCliSuite {
139143
val launcher = root / destDir / s"$appName.deb"
140144
expect(os.isFile(launcher))
141145

146+
// check flags
147+
val debInfo = os.proc("dpkg", "--info", launcher).call().out.text().trim
148+
expect(debInfo.contains(s"Priority: $priority"))
149+
expect(debInfo.contains(s"Section: $section"))
150+
142151
if (hasDocker) {
143152
val script =
144153
s"""#!/usr/bin/env bash

0 commit comments

Comments
 (0)