From e0a26267bd196913bc7d4ddd70c4ac535c9d8031 Mon Sep 17 00:00:00 2001 From: naiba Date: Mon, 30 Nov 2020 12:45:51 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20inject=20version=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/agent/main.go | 3 +++ script/install.sh | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/agent/main.go b/cmd/agent/main.go index fd8bba6..30133fb 100644 --- a/cmd/agent/main.go +++ b/cmd/agent/main.go @@ -60,6 +60,9 @@ func doSelfUpdate() { } func main() { + // 来自于 GoReleaser 的版本号 + dao.Version = version + rootCmd.PersistentFlags().StringVarP(&server, "server", "s", "localhost:5555", "客户端ID") rootCmd.PersistentFlags().StringVarP(&clientID, "id", "i", "", "客户端ID") rootCmd.PersistentFlags().StringVarP(&clientSecret, "secret", "p", "", "客户端Secret") diff --git a/script/install.sh b/script/install.sh index fd5ba2b..307abc0 100755 --- a/script/install.sh +++ b/script/install.sh @@ -234,7 +234,7 @@ modify_dashboard_config() { return 0 fi - echo "关于管理员 GitHub ID:复制自己GitHub头像图片地址,/[ID].png 多个用英文逗号隔开 id1,id2,id3" && + echo "关于管理员 GitHub ID:复制自己GitHub头像图片地址里面的数字,/87123.png 多个用英文逗号隔开 87123,id2,id3" && read -p "请输入 ID 列表: " nz_admin_ids && echo "关于 GitHub Oauth2 应用:在 https://github.com/settings/developers 创建,无需审核 Callback 填 http(s)://域名或IP/oauth2/callback" && read -p "请输入 GitHub Oauth2 应用的 Client ID: " nz_github_oauth_client_id && @@ -262,6 +262,7 @@ modify_dashboard_config() { restart_dashboard() { cd $NZ_DASHBOARD_PATH + docker-compose pull docker-compose down docker-compose up -d if [[ $? == 0 ]]; then