Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

Commit ef635ce

Browse files
authored
Merge pull request #68 from redskyops/fixTagFeetch
fix: Ignore invalid git tags
2 parents 88bc906 + f4f430e commit ef635ce

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.github/workflows/master.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
steps:
1616
- name: Check out code
1717
uses: actions/checkout@v2
18-
- name: Unshallow
19-
run: git fetch --prune --unshallow
18+
- name: Fetch tags
19+
run: git fetch --depth=1 origin '+refs/tags/*:refs/tags/*'
2020
- name: Set up Go
2121
uses: actions/setup-go@v2
2222
with:

.github/workflows/push.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
steps:
1414
- name: Check out code
1515
uses: actions/checkout@v2
16-
- name: Unshallow
17-
run: git fetch --prune --unshallow
16+
- name: Fetch tags
17+
run: git fetch --depth=1 origin '+refs/tags/*:refs/tags/*'
1818
- name: Verify Header
1919
uses: talos-systems/conform@v0.1.0-alpha.19
2020
- name: Set up Go

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ GOBIN=$(shell go env GOBIN)
1515
endif
1616

1717
# Collect version information
18-
VERSION ?= $(shell git ls-remote --tags origin 'v*' | tail -1 | awk -F/ '{ print $$3 }')-next
18+
VERSION ?= $(shell git ls-remote --tags --refs origin 'v*' | awk -F/ '{ print $$3 }' | tail -1)-next
1919
BUILD_METADATA ?=
2020
GIT_COMMIT ?= $(shell git rev-parse HEAD)
2121

0 commit comments

Comments
 (0)