Kaynağa Gözat

chore: ensure pacman update in builder (#2398)

* ensure pacman up

* lint step fix
Jo 1 yıl önce
ebeveyn
işleme
9524cbbaed
3 değiştirilmiş dosya ile 4 ekleme ve 6 silme
  1. 1 1
      .github/workflows/testing.yml
  2. 2 4
      Makefile
  3. 1 1
      ci.Dockerfile

+ 1 - 1
.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

+ 2 - 4
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:

+ 1 - 1
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