mirror of
https://github.com/jeessy2/ddns-go.git
synced 2025-10-20 23:43:45 +08:00
chore: get HEAD commit when version is missing tag (#777)
Also, add more instructions to `bug_report.yml` on how to find the ddns-go version.
This commit is contained in:
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@ -71,7 +71,7 @@ body:
|
|||||||
- type: input
|
- type: input
|
||||||
attributes:
|
attributes:
|
||||||
label: 版本
|
label: 版本
|
||||||
description: ddns-go 的版本或 commit,可运行 `ddns-go -v` 查看版本
|
description: ddns-go 的版本或 commit(可在网页右上角找到,或运行 `ddns-go -v` 查看版本)
|
||||||
placeholder: v0.0.1
|
placeholder: v0.0.1
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
3
Makefile
3
Makefile
@ -1,6 +1,7 @@
|
|||||||
.PHONY: build clean test test-race
|
.PHONY: build clean test test-race
|
||||||
|
|
||||||
VERSION=$(shell git describe --tags `git rev-list --tags --max-count=1`)
|
# 如果找不到 tag 则使用 HEAD commit
|
||||||
|
VERSION=$(shell git describe --tags `git rev-list --tags --max-count=1` 2>/dev/null || git rev-parse --short HEAD)
|
||||||
BUILD_TIME=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
|
BUILD_TIME=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||||
BIN=ddns-go
|
BIN=ddns-go
|
||||||
DIR_SRC=.
|
DIR_SRC=.
|
||||||
|
Reference in New Issue
Block a user