Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ fi
$sudo mkdir -p "$INSTALL_DIR"
$sudo install -m 0755 "$bin" "$INSTALL_DIR/aperture"

echo "==> Installed $("$INSTALL_DIR/aperture" -version | head -1) to $INSTALL_DIR/aperture"
echo "==> Installed $("$INSTALL_DIR/aperture" --version | head -1) to $INSTALL_DIR/aperture"
17 changes: 17 additions & 0 deletions scripts/sign_macos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,20 @@ case "$tool $1" in
;;
esac
`

// install.sh reports the version of what it just installed. It has to use the
// GNU form: the single-dash long form is deprecated, so it both prints a
// deprecation warning on stderr and would greet every fresh install with a
// notice about a flag the user never typed.
func TestInstallScriptReportsVersionInGNUForm(t *testing.T) {
script, err := os.ReadFile("../install.sh")
if err != nil {
t.Fatal(err)
}
if strings.Contains(string(script), " -version") {
t.Error("install.sh calls the installed binary with the deprecated -version form")
}
if !strings.Contains(string(script), `aperture" --version`) {
t.Error("install.sh no longer reports the installed version")
}
}
Loading