-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #929 from cailyoung/fix-test-build-script
Update "testing" build script so it works regardless of execution location
- Loading branch information
Showing
2 changed files
with
37 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,34 @@ | ||
#!/bin/bash | ||
|
||
# failsafes | ||
set -eu | ||
set -o pipefail | ||
# | ||
# Compile CommandPost: | ||
# | ||
|
||
cd ../CommandPost-App/ | ||
# set directory variables | ||
# export SCRIPT_NAME | ||
export SCRIPT_HOME | ||
export HAMMERSPOON_HOME | ||
|
||
# SCRIPT_NAME="$(basename "$0")" | ||
SCRIPT_HOME="$(dirname "$(greadlink -f "$0")")" # fully qualified directory of this script | ||
HAMMERSPOON_HOME="$(greadlink -f "${SCRIPT_HOME}/../../CommandPost-App")" # fully qualified directory of the CommandPost-App repository | ||
|
||
make clean | ||
make release | ||
make docs | ||
# Import our function library | ||
# shellcheck source=scripts/inc/librelease.sh disable=SC1091 | ||
source "${SCRIPT_HOME}/inc/librelease.sh" | ||
|
||
rm -fr `xcodebuild -workspace Hammerspoon.xcworkspace -scheme Hammerspoon -configuration DEBUG -showBuildSettings | sort | uniq | grep " BUILT_PRODUCTS_DIR =" | awk '{ print $3 }'`/CommandPost.app | ||
build_hammerspoon_dev # run the build-dev function from librelease | ||
|
||
# clean up the unsigned build | ||
rm -fr "$(xcodebuild -workspace "${HAMMERSPOON_HOME}/Hammerspoon.xcworkspace" -scheme Hammerspoon -configuration Release -showBuildSettings | sort | uniq | grep " BUILT_PRODUCTS_DIR =" | awk '{ print $3 }')/CommandPost.app" | ||
|
||
# | ||
# Sign App with self-signed certificate: | ||
# | ||
codesign --verbose --sign "Internal Code Signing" "build/CommandPost.app/Contents/Frameworks/Sparkle.framework/Versions/A" | ||
codesign --verbose --sign "Internal Code Signing" "build/CommandPost.app/Contents/Frameworks/LuaSkin.framework/Versions/A" | ||
codesign --verbose --sign "Internal Code Signing" "build/CommandPost.app" | ||
codesign --verbose --sign "Internal Code Signing" "${HAMMERSPOON_HOME}/build/CommandPost.app/Contents/Frameworks/Sparkle.framework/Versions/A" | ||
codesign --verbose --sign "Internal Code Signing" "${HAMMERSPOON_HOME}/build/CommandPost.app/Contents/Frameworks/LuaSkin.framework/Versions/A" | ||
codesign --verbose --sign "Internal Code Signing" "${HAMMERSPOON_HOME}/build/CommandPost.app" | ||
|
||
echo "Dev build complete. Launch from ${HAMMERSPOON_HOME}/build/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters