Skip to content

Commit 28181ad

Browse files
authored
Merge branch 'main' into github-actions
2 parents fa54dc4 + dd34f20 commit 28181ad

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Successful test
14-
run: echo "The job was automatically triggered by a ${{ github.push }} event."
15-
14+
run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
1615
test-makefile:
1716
name: build and test makefile
1817
runs-on: ubuntu-latest

Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ endif
99

1010
BUILDFLAGS :=
1111

12-
PACKAGES := $(shell GO111MODULE=on go list $(BUILDFLAGS) ./...)
12+
PACKAGES := $(shell go list $(BUILDFLAGS) ./...)
1313
SOURCE_DIRS = $(shell echo $(PACKAGES) | awk 'BEGIN{FS="/"; RS=" "}{print $$4}' | uniq)
1414

1515
PREFIX ?= ${DESTDIR}/usr
@@ -20,13 +20,13 @@ export PATH := $(PATH):${GOBIN}
2020
all: tools tar-diff tar-patch test validate .gitvalidation
2121

2222
build:
23-
GO111MODULE="on" go build $(BUILDFLAGS) ./...
23+
go build $(BUILDFLAGS) ./...
2424

2525
tar-diff:
26-
GO111MODULE="on" go build $(BUILDFLAGS) ./cmd/tar-diff
26+
go build $(BUILDFLAGS) ./cmd/tar-diff
2727

2828
tar-patch:
29-
GO111MODULE="on" go build $(BUILDFLAGS) ./cmd/tar-patch
29+
go build $(BUILDFLAGS) ./cmd/tar-patch
3030

3131
install: tar-diff tar-patch
3232
install -d -m 755 ${INSTALLDIR}
@@ -37,12 +37,12 @@ tools: .install.gitvalidation .install.golangci-lint
3737

3838
.install.gitvalidation:
3939
if [ ! -x "$(GOBIN)/git-validation" ]; then \
40-
GO111MODULE="off" go get $(BUILDFLAGS) github.com/vbatts/git-validation; \
40+
go install github.com/vbatts/git-validation@latest; \
4141
fi
4242

4343
.install.golangci-lint:
4444
if [ ! -x "$(GOBIN)/golangci-lint" ]; then \
45-
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(GOBIN) v1.25.0; \
45+
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(GOBIN) latest; \
4646
fi
4747

4848
clean:
@@ -52,23 +52,23 @@ integration-test: tar-diff tar-patch
5252
tests/test.sh
5353

5454
unit-test:
55-
GO111MODULE="on" go test $(BUILDFLAGS) -cover ./...
55+
go test $(BUILDFLAGS) -cover ./...
5656

5757
test: unit-test integration-test
5858

5959
fmt:
6060
@gofmt -l -s -w $(SOURCE_DIRS)
6161

6262
validate: lint
63-
@GO111MODULE="on" go vet ./...
63+
@go vet ./...
6464
@test -z "$$(gofmt -s -l . | tee /dev/stderr)"
6565

6666
lint:
6767
$(GOBIN)/golangci-lint run
6868

6969
.gitvalidation:
7070
@which $(GOBIN)/git-validation > /dev/null 2>/dev/null || (echo "ERROR: git-validation not found. Consider 'make clean && make tools'" && false)
71-
ifeq ($(TRAVIS),true)
71+
ifeq ($(GITHUB_ACTIONS),true)
7272
$(GOBIN)/git-validation -q -run DCO,short-subject,dangling-whitespace
7373
else
7474
git fetch -q "https://github.com/containers/tar-diff.git" "refs/heads/master"

0 commit comments

Comments
 (0)