1
0
mirror of https://github.com/Jguer/yay synced 2024-06-29 06:56:29 +00:00

chore: ensure pacman update in builder (#2398)

* ensure pacman up

* lint step fix
This commit is contained in:
Jo 2024-03-16 01:13:30 +01:00 committed by GitHub
parent 48d1d3d2d5
commit 9524cbbaed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 6 deletions

View File

@ -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

View File

@ -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:

View File

@ -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