Skip to content

Commit

Permalink
chore: ensure pacman update in builder (#2398)
Browse files Browse the repository at this point in the history
* ensure pacman up

* lint step fix
  • Loading branch information
Jguer authored Mar 16, 2024
1 parent 48d1d3d commit 9524cbb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion ci.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9524cbb

Please sign in to comment.