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

Fixing some issues with the Mac build for ent #48457

Merged
merged 4 commits into from
Nov 5, 2024
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 build.assets/build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ if [[ "${PACKAGE_TYPE}" == "pkg" ]]; then
FILE_LIST="${TAR_PATH}/teleport ${TAR_PATH}/tbot ${TAR_PATH}/fdpass-teleport"
BUNDLE_ID="${b:-com.gravitational.teleport}"
if [[ "${TELEPORT_TYPE}" == "ent" ]]; then
PKG_FILENAME="teleport-ent-${TELEPORT_VERSION}${ARCH_TAG}.${PACKAGE_TYPE}"
PKG_FILENAME="teleport-ent-bin-${TELEPORT_VERSION}${ARCH_TAG}.${PACKAGE_TYPE}"
fheinecke marked this conversation as resolved.
Show resolved Hide resolved
else
PKG_FILENAME="teleport-bin-${TELEPORT_VERSION}${ARCH_TAG}.${PACKAGE_TYPE}"
fi
Expand Down
2 changes: 1 addition & 1 deletion build.assets/build-pkg-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ or name of the key to sign packages"

# Prepare app shell.
local target="$tmp/root/$PACKAGE_NAME.app"
cp -r "$tmp/teleport/$PACKAGE_NAME.app" "$target"
cp -r "$tmp/teleport$ent/$PACKAGE_NAME.app" "$target"

local entitlements="$buildassets/macos/$TSH_SKELETON/$TSH_SKELETON.entitlements"
if [[ "$PACKAGE_NAME" == "tctl" ]]; then
Expand Down
22 changes: 22 additions & 0 deletions build.assets/macos/install
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,28 @@ cp -f teleport tbot fdpass-teleport $BINDIR/ || exit 1
cp -rf tsh.app/ "$APPS_DIR"/tsh.app/ || exit 1
cp -rf tctl.app/ "$APPS_DIR"/tctl.app/ || exit 1


# If tsh exists and is not a link, make a backup.
if [ -f "$BINDIR/tsh" ] && [ ! -L "$BINDIR/tsh" ]; then
rm -f "$BINDIR/tsh.bak"
mv "$BINDIR/tsh" "$BINDIR/tsh.bak"
fi

# Link package to $BINDIR.
rm -f "$BINDIR/tsh" # in case link exists
ln -s "$APPS_DIR/tsh.app/Contents/MacOS/tsh" "$BINDIR/tsh"

# If tctl exists and is not a link, make a backup.
if [ -f "$BINDIR/tctl" ] && [ ! -L "$BINDIR/tctl" ]; then
rm -f "$BINDIR/tctl.bak"
mv "$BINDIR/tctl" "$BINDIR/tctl.bak"
fi

# Link package to $BINDIR.
rm -f "$BINDIR/tctl" # in case link exists
ln -s "$APPS_DIR/tctl.app/Contents/MacOS/tctl" "$BINDIR/tctl"


echo "Teleport binaries have been copied to $BINDIR"
echo ""
echo "Thanks for installing Teleport."
Expand Down
Loading