-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
70 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o pipefail | ||
set -o nounset | ||
|
||
command="${1}" | ||
RESOLVED_COMMAND="" | ||
|
||
|
||
if hash "${command}" 2>/dev/null; then | ||
RESOLVED_COMMAND=$(command -v "${command}") | ||
else | ||
(echo >&2 "ERROR: ${1} is not installed.") | ||
(echo >&2 "Make sure ${1} is installed and on your PATH.") | ||
exit 1 | ||
fi | ||
|
||
echo "${RESOLVED_COMMAND}" |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
# exit on error | ||
set -e | ||
# exit on undefined variables | ||
set -u | ||
# return the command that was the reason behind the failure | ||
set -o pipefail | ||
|
||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd) | ||
REQUIRE_COMMAND="${SCRIPT_DIR}/require-command.sh" | ||
GRADLE="${SCRIPT_DIR}/../gradlew" | ||
|
||
OP_CMD=$("${REQUIRE_COMMAND}" op) | ||
SIGNING_KEY=$(${OP_CMD} read --account ergon.1password.eu "op://CoP CD/Gradle Todo Checker PlugIn Signing Keys/Signing Keys/private key") | ||
SIGNING_KEY_PASSWORD=$(${OP_CMD} read --no-newline --account ergon.1password.eu "op://CoP CD/Gradle Todo Checker PlugIn Signing Keys/password") | ||
|
||
ORG_GRADLE_PROJECT_signingKey="${SIGNING_KEY}" | ||
ORG_GRADLE_PROJECT_signingPassword="${SIGNING_KEY_PASSWORD}" | ||
export ORG_GRADLE_PROJECT_signingKey | ||
export ORG_GRADLE_PROJECT_signingPassword | ||
|
||
"${GRADLE}" clean sign | ||
"${GRADLE}" clean publishTodoCheckerPluginPublicationToLocalRepository | ||
|
||
unset SIGNING_KEY | ||
unset ORG_GRADLE_PROJECT_signingKey | ||
unset SIGNING_KEY_PASSWORD | ||
unset ORG_GRADLE_PROJECT_signingPassword |