Skip to content

Commit 9d0495b

Browse files
authored
feat(api): Update the bump script since CI doesn't run it (#5115)
- this is so the script can be run on MacOS where the date function is slightly different
1 parent 3c026ec commit 9d0495b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/bump-version.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
55
cd $SCRIPT_DIR/..
66
SENTRY_API_SCHEMA_SHA="$(curl -sSL 'https://api.github.com/repos/getsentry/sentry-api-schema/commits/main' | awk 'BEGIN { RS=",|:{\n"; FS="\""; } $2 == "sha" { print $4 }')"
77

8-
sed -i -e "s/\(Change Date:\s*\)[-0-9]\+\$/\\1$(date +'%Y-%m-%d' -d '3 years')/" LICENSE
9-
sed -i -e 's|^const SENTRY_API_SCHEMA_SHA =.*$|const SENTRY_API_SCHEMA_SHA = "'$SENTRY_API_SCHEMA_SHA'"|g' src/gatsby/utils/resolveOpenAPI.ts
8+
# These commands won't work on our machines since they're running macosx
9+
if [ "${1:-prod}" == "prod" ]; then
10+
sed -i -e "s/\(Change Date:\s*\)[-0-9]\+\$/\\1$(date +'%Y-%m-%d' -d '3 years')/" LICENSE
11+
sed -i -e 's|^const SENTRY_API_SCHEMA_SHA =.*$|const SENTRY_API_SCHEMA_SHA = "'$SENTRY_API_SCHEMA_SHA'"|g' src/gatsby/utils/resolveOpenAPI.ts
12+
fi

0 commit comments

Comments
 (0)