Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

homebrew: update install location for arm64 #966

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ jobs:
- name: Create component package
run: |
src/osx/Installer.Mac/pack.sh --payload=payload \
--version=$GitBuildVersionSimple \
--version=$GitBuildVersionSimple --runtime=${{ matrix.runtime }} \
--output=components/com.microsoft.gitcredentialmanager.component.pkg

- name: Create product archive
Expand Down
2 changes: 1 addition & 1 deletion src/osx/Installer.Mac/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ DISTOUT="$OUTDIR/gcm-$RUNTIME-$VERSION.pkg"

# Layout and pack
"$INSTALLER_SRC/layout.sh" --configuration="$CONFIGURATION" --output="$PAYLOAD" --runtime="$RUNTIME" || exit 1
"$INSTALLER_SRC/pack.sh" --payload="$PAYLOAD" --version="$VERSION" --output="$COMPONENTOUT" || exit 1
"$INSTALLER_SRC/pack.sh" --payload="$PAYLOAD" --version="$VERSION" --output="$COMPONENTOUT" --runtime="$RUNTIME" || exit 1
"$INSTALLER_SRC/dist.sh" --package-path="$COMPONENTDIR" --version="$VERSION" --output="$DISTOUT" --runtime="$RUNTIME" || exit 1

echo "Build of Installer.Mac complete."
23 changes: 22 additions & 1 deletion src/osx/Installer.Mac/pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ INSTALLER_SRC="$SRC/osx/Installer.Mac"

# Product information
IDENTIFIER="com.microsoft.gitcredentialmanager"
INSTALL_LOCATION="/usr/local/share/gcm-core"

# Parse script arguments
for i in "$@"
Expand All @@ -31,12 +30,34 @@ case "$i" in
PKGOUT="${i#*=}"
shift # past argument=value
;;
--runtime=*)
RUNTIME="${i#*=}"
shift # past argument=value
;;
*)
# unknown option
;;
esac
done

if [ -z "$RUNTIME" ]; then
die "--runtime was not set"
fi

case "$RUNTIME" in
"osx-x64")
PREFIX="/usr/local"
;;
"osx-arm64")
PREFIX="/opt/homebrew"
;;
*)
die "Unknown runtime '$RUNTIME'"
;;
esac

INSTALL_LOCATION="$PREFIX/share/gcm-core"

# Perform pre-execution checks
if [ -z "$VERSION" ]; then
die "--version was not set"
Expand Down