Skip to content

Commit

Permalink
Fixes to the release script
Browse files Browse the repository at this point in the history
  • Loading branch information
cmsj committed Feb 17, 2015
1 parent 2d96cbb commit 1dbf0fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions scripts/librelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ function assert_version_in_git_tags() {
}

function assert_version_not_in_github_releases() {
local RELEASE_INFO="$(github-release info -t "$VERSION" 2>&1)"
github-release info -t "$VERSION" >/dev/null 2>&1
if [ "$?" == "0" ]; then
echo "${RELEASE_INFO}"
github-release info -t "$VERSION"
fail "ERROR: github already seems to have version $VERSION"
fi
}

function assert_docs_bundle_complete() {
pushd "${HAMMERSPOON_HOME}/scripts/docs" >/dev/null
bundle check
bundle check >/dev/null 2>&1
if [ "$?" != "0" ]; then
fail "ERROR: docs bundle is incomplete. Ensure 'bundle' is installed and run 'sudo bundle install' in hammerspoon/scripts/docs/"
fail "ERROR: docs bundle is incomplete. Ensure 'bundle' is installed and run 'bundle install' in hammerspoon/scripts/docs/"
fi
popd >/dev/null
}
Expand All @@ -70,7 +70,7 @@ function assert_cocoapods_state() {
}

function assert_website_repo() {
pushd "${HAMMERSPOON_HOME}" >/dev/null
pushd "${HAMMERSPOON_HOME}/../" >/dev/null
if [ ! -d website/.git ]; then
fail "ERROR: website repo does not exist. git clone [email protected]:Hammerspoon/hammerspoon.github.io.git"
fi
Expand All @@ -79,19 +79,19 @@ function assert_website_repo() {
if [ "$?" != "0" ]; then
fail "ERROR: website repo has uncommitted changes"
fi
pushd "website" >/dev/null
git fetch origin
local DESYNC=$(git rev-list --left-right "@{upstream}"...HEAD)
if [ "${DESYNC}" != "" ]; then
echo "$DESYNC"
fail "ERROR: website repo is not in sync with upstream"
fi
popd >/dev/null
popd >/dev/null
}

function assert_valid_code_signature() {
echo "Ensuring valid code signature..."
codesign --verify --verbose=4 "${HAMERSPOON_HOME}/build/Hammerspoon.app"
codesign --verify --verbose=4 "${HAMMERSPOON_HOME}/build/Hammerspoon.app"
if [ "$?" != "0" ]; then
codesign -dvv "${HAMMERSPOON_HOME}/build/Hammerspoon.app"
fail "ERROR: Invalid signature"
Expand Down
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ assert_codesign_authority_token && export CODESIGN_AUTHORITY_TOKEN="$(cat "${COD
assert_version_in_xcode
assert_version_in_git_tags
assert_version_not_in_github_releases
assert_docs_bundle_completeA
assert_docs_bundle_complete
assert_cocoapods_state
assert_website_repo

Expand Down

0 comments on commit 1dbf0fa

Please sign in to comment.