git config --global --add safe.directory .

git config --global --add safe.directory '*'

git config --global --add safe.directory .
This commit is contained in:
日下部 詩 2022-05-19 18:03:08 +08:00 committed by KusakabeSi
parent 7ec7ecde6b
commit 1356780d7d
2 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,7 @@ jobs:
- name: Retrieve version
shell: bash
run: |
git config --global --add safe.directory '*'
VERSION=$(git describe --abbrev=0)
echo "::set-output name=VERSION::$VERSION"
id: version
@ -128,6 +129,7 @@ jobs:
- name: Retrieve version
shell: bash
run: |
git config --global --add safe.directory '*'
VERSION=$(git describe --abbrev=0)
echo "::set-output name=VERSION::$VERSION"
id: version

View File

@ -9,6 +9,7 @@ all: generate-version-and-build
MAKEFLAGS += --no-print-directory
generate-version-and-build:
git config --global --add safe.directory "$(abspath .)"
@export GIT_CEILING_DIRECTORIES="$(realpath $(CURDIR)/..)" && \
tag="$$(git describe --tags --abbrev=0 2>/dev/null)" && \
ver="$$(printf 'package main\n\nvar Version = "%s"\n' "$$tag")" && \