#!/bin/sh 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": "$BUILD_ID", "URL": "$BUILD_URL", "Channel": "$BUILD_CHANNEL" } EOF