Skip to content

Commit

Permalink
add better logging for bash scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
BenoitRanque committed Feb 7, 2025
1 parent cce7989 commit ce6e65a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:

- run: |
set -evo pipefail
trap 'echo "Error occurred at line $LINENO: $BASH_COMMAND";' ERR
DATE_TODAY=$(date +"%Y-%m-%d")
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ jobs:

- name: build the CLI
run: |
set -evo pipefail
trap 'echo "Error occurred at line $LINENO: $BASH_COMMAND";' ERR
# If we're on a tag, use the tag name as the release version.
if [[ "$GITHUB_REF_TYPE" == 'tag' ]]; then
# Ensure that the version specified in Cargo.toml is the same as the tag (with a 'v' prefix).
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tag-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- name: Read version from Cargo.toml and push appropriate tag
id: read-version
run: |
set -evo pipefail
trap 'echo "Error occurred at line $LINENO: $BASH_COMMAND";' ERR
CARGO_VERSION="$(cargo metadata --format-version=1 | jq -r '.packages | .[] | select(.name == "ndc-clickhouse-cli") | .version')"
VERSION_TAG="v$CARGO_VERSION"
if git rev-parse "$VERSION_TAG" >/dev/null 2>&1; then
Expand Down

0 comments on commit ce6e65a

Please sign in to comment.