From fdbed511a89ff278203d38dfc1de4c4d4bfafa67 Mon Sep 17 00:00:00 2001 From: Seven Date: Sun, 5 Jan 2025 16:42:57 +0800 Subject: [PATCH] [+] Updated getCommID.sh --- getCommitID.sh | 18 +++++++++++++----- themes/hugo-theme-stack | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/getCommitID.sh b/getCommitID.sh index f7d5320..51c71eb 100644 --- a/getCommitID.sh +++ b/getCommitID.sh @@ -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 < data/Build.json { - "ID": "$COMMIT_ID", - "URL": "$COMMIT_URL", - "Channel": "$CF_PAGES_BRANCH" + "ID": "$BUILD_ID", + "URL": "$BUILD_URL", + "Channel": "$BUILD_CHANNEL" } EOF \ No newline at end of file diff --git a/themes/hugo-theme-stack b/themes/hugo-theme-stack index 6e452ef..a0d9295 160000 --- a/themes/hugo-theme-stack +++ b/themes/hugo-theme-stack @@ -1 +1 @@ -Subproject commit 6e452ef71386cbed6ec9349b05f6a996350da292 +Subproject commit a0d929586b55195934426de258ffd24549a38f5a