mirror of
https://github.com/Jguer/yay.git
synced 2024-11-06 00:57:21 +01:00
chore: ensure pacman update in builder (#2398)
* ensure pacman up * lint step fix
This commit is contained in:
parent
48d1d3d2d5
commit
9524cbbaed
2
.github/workflows/testing.yml
vendored
2
.github/workflows/testing.yml
vendored
@ -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
|
||||
|
6
Makefile
6
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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user