Skip to content

Commit dde8771

Browse files
committed
Update version code. Update create-release.sh
1 parent ee9957a commit dde8771

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twitch_drops_bot",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "A Node.js bot for automatically collecting Twitch drops.",
55
"type": "module",
66
"repository": {

tools/create-release.sh

+12-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ currentDirectory=$(dirname "$0")
55

66
personalAccessToken=$1
77
if [ -z "${personalAccessToken}" ]; then
8-
echo "Missing GitHub personal access token! See https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry if you need to create one."
8+
echo "Missing GitHub personal access token! Visit https://github.com/settings/tokens/new to create one. Must have \"write:packages\" permission."
99
exit 1
1010
fi
1111

@@ -54,11 +54,21 @@ if ! confirm; then
5454
exit 2
5555
fi
5656

57+
# Get the project directory (https://stackoverflow.com/questions/59895/how-can-i-get-the-source-directory-of-a-bash-script-from-within-the-script-itsel)
58+
scriptDirectory="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" &>/dev/null && pwd 2>/dev/null)"
59+
projectDirectory="$(cd "$scriptDirectory/../" && pwd)"
60+
5761
# Build and push docker image
5862
docker buildx build \
5963
--platform linux/amd64,linux/arm64/v8,linux/arm/v7 \
6064
--tag ghcr.io/tychothetaco/twitch-drops-bot:v"$currentVersion" \
6165
--tag ghcr.io/tychothetaco/twitch-drops-bot:latest-release \
6266
--build-arg GIT_COMMIT_HASH="$hash" \
6367
--output type=registry \
64-
.
68+
"$projectDirectory"
69+
70+
# Tag the commit with the version number
71+
echo "Tagging commit with version code..."
72+
git tag v"$currentVersion" "$hash"
73+
74+
echo "Done!"

0 commit comments

Comments
 (0)