From 9524cbbaedc4dd342285de41ca79cafd7238a291 Mon Sep 17 00:00:00 2001 From: Jo Date: Sat, 16 Mar 2024 01:13:30 +0100 Subject: [PATCH] chore: ensure pacman update in builder (#2398) * ensure pacman up * lint step fix --- .github/workflows/testing.yml | 2 +- Makefile | 6 ++---- ci.Dockerfile | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 2a7c858d..4b79617a 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -18,7 +18,7 @@ jobs: ${{ runner.os }}-go- - name: Lint env: - GOFLAGS: -buildvcs=false + GOFLAGS: -buildvcs=false -tags=next run: /app/bin/golangci-lint run ./... - name: Run Build and Tests run: make test diff --git a/Makefile b/Makefile index 3d793453..eea78d4d 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ MOFILES := $(POFILES:.po=.mo) FLAGS ?= -trimpath -mod=readonly -modcacherw EXTRA_FLAGS ?= -buildmode=pie LDFLAGS := -X "main.yayVersion=${VERSION}" -X "main.localePath=${SYSTEMLOCALEPATH}" -linkmode=external -FLAGS += $(shell pacman -T 'libalpm.so=14-64' >/dev/null 2>&1 && echo "-tags next") +FLAGS += $(shell pacman -T 'libalpm.so=14-64' >/dev/null 2>&1 && echo "-tags=next") RELEASE_DIR := ${PKGNAME}_${VERSION}_${ARCH} PACKAGE := $(RELEASE_DIR).tar.gz @@ -83,9 +83,7 @@ docker-build: .PHONY: lint lint: - $(GO) vet $(FLAGS) ./... - @test -z "$$(gofmt -l $(SOURCES))" || (echo "Files need to be linted. Use make fmt" && false) - golangci-lint run ./... + GOFLAGS="$(FLAGS)" golangci-lint run ./... .PHONY: fmt fmt: diff --git a/ci.Dockerfile b/ci.Dockerfile index 167a6c0f..84c57f78 100644 --- a/ci.Dockerfile +++ b/ci.Dockerfile @@ -7,7 +7,7 @@ WORKDIR /app COPY go.mod . RUN pacman-key --init && pacman -Sy && pacman -S --overwrite=* --noconfirm archlinux-keyring && \ - pacman -Su --overwrite=* --needed --noconfirm doxygen meson asciidoc go git gcc make sudo base-devel && \ + pacman -Su --overwrite=* --needed --noconfirm pacman doxygen meson asciidoc go git gcc make sudo base-devel && \ rm -rfv /var/cache/pacman/* /var/lib/pacman/sync/* && \ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.56.2 && \ go mod download