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