-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Update "testing" build script so it works regardless of execution location #929
Changes from 40 commits
ba9a626
b6215fc
da5f7bc
6775ff8
d5e28e6
4c4b52b
f6feaff
73c6794
1ed6ff4
1921390
e6ebc30
8262bc1
24ba9b3
45031d8
263bff3
0a99d8d
2b6142e
6fb5f23
f614c13
9b34830
f017fbb
a009db2
ac0369b
9931fc2
a48a771
cb1449d
82873aa
749f1f2
7af27ba
8e0992c
2f3e2cf
843cfde
812e0bc
d0172a8
81d7e04
28096b1
1af277f
b25a260
b74f20b
1aedd43
d378c47
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Couldn't parse this shellcheck annotation. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Opened markstory/lint-review#172 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Couldn't parse this shellcheck annotation. |
||
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/" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -232,6 +232,20 @@ function build_hammerspoon_app() { | |
fi | ||
} | ||
|
||
function build_hammerspoon_dev() { | ||
echo "Building CommandPost.app for development..." | ||
pushd "${HAMMERSPOON_HOME}" >/dev/null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use 'cd ... || exit' or 'cd ... || return' in case cd fails. |
||
make clean | ||
make release | ||
rm build/docs.json | ||
# make docs | ||
# make build/html/LuaSkin | ||
popd >/dev/null | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use 'cd ... || exit' or 'cd ... || return' in case cd fails. |
||
if [ ! -e "${HAMMERSPOON_HOME}"/build/CommandPost.app ]; then | ||
fail "Looks like the build failed. sorry!" | ||
fi | ||
} | ||
|
||
############################ POST-BUILD FUNCTIONS ############################# | ||
|
||
function build_dmgcanvas() { | ||
|
@@ -432,4 +446,3 @@ function release_tweet() { | |
t update "Just released ${VERSION} - http://www.hammerspoon.org/releasenotes/" | ||
t set active "$CURRENT" | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't parse this shellcheck annotation.
Expected "disable". Fix any mentioned problems and try again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stickler needs to update their shellcheck version to one that includes the source argument for directives. All this does is tell shellcheck where the script actually is.