[+] Updated getCommID.sh

This commit is contained in:
Seven 2025-01-05 16:42:57 +08:00
parent e544750726
commit fdbed511a8
Signed by: realSunyz
SSH Key Fingerprint: SHA256:5dk3slVnWtJYlwrnURrUYXoimuSx8Vi9pbs4n3XoGH0
2 changed files with 14 additions and 6 deletions

View File

@ -1,11 +1,19 @@
#!/bin/sh
COMMIT_ID=$(git rev-parse --short HEAD)
COMMIT_URL="https://git.sunyz.net/realSunyz/pub.seven.blog/commit/$COMMIT_ID"
BUILD_ID=$(git rev-parse --short HEAD)
BUILD_URL="https://git.sunyz.net/realSunyz/pub.seven.blog/commit/$BUILD_ID"
if [ "$CF_PAGES_BRANCH" = "main" ]; then
BUILD_CHANNEL="production"
elif [ "$CF_PAGES_BRANCH" = "dev" ]; then
BUILD_CHANNEL="development"
else
BUILD_CHANNEL="unknown"
fi
cat <<EOF > data/Build.json
{
"ID": "$COMMIT_ID",
"URL": "$COMMIT_URL",
"Channel": "$CF_PAGES_BRANCH"
"ID": "$BUILD_ID",
"URL": "$BUILD_URL",
"Channel": "$BUILD_CHANNEL"
}
EOF

@ -1 +1 @@
Subproject commit 6e452ef71386cbed6ec9349b05f6a996350da292
Subproject commit a0d929586b55195934426de258ffd24549a38f5a