From 6076d359fc16034b0514d322267d83eff3e28ebe Mon Sep 17 00:00:00 2001 From: zhao Date: Fri, 20 Jun 2025 18:36:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhao --- build.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 build.sh diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..85b5bb3 --- /dev/null +++ b/build.sh @@ -0,0 +1,28 @@ +#!/bin/bash -e +export RED_COLOR='\e[1;31m' +export GREEN_COLOR='\e[1;32m' +export YELLOW_COLOR='\e[1;33m' +export BLUE_COLOR='\e[1;34m' +export PINK_COLOR='\e[1;35m' +export SHAN='\e[1;33;5m' +export RES='\e[0m' + +GROUP= +group() { + endgroup + echo "::group:: $1" + GROUP=1 +} +endgroup() { + if [ -n "$GROUP" ]; then + echo "::endgroup::" + fi + GROUP= +} + +# check +if [ "$(whoami)" != "zhiern" ] && [ -z "$git_name" ] && [ -z "$git_password" ]; then + echo -e "\n${RED_COLOR} Not authorized. Execute the following command to provide authorization information:${RES}\n" + echo -e "${BLUE_COLOR} export git_name=your_username git_password=your_password${RES}\n" + exit 1 +fi \ No newline at end of file