summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Goodman <wagoodman@users.noreply.github.com>2023-07-06 10:06:34 -0400
committerGitHub <noreply@github.com>2023-07-06 10:06:34 -0400
commitabbac157bbf52053e603d569483b17b1f1f49293 (patch)
tree5f8e09c990e7e71427984eaad6f749f405d442a0
parent361037f2728f6f1b0282a01311976c176a933a5b (diff)
parentdfe9a8c5c96685259cc0fa0e2963c26434660b75 (diff)
Merge pull request #457 from abitrolly/patch-1
Fix CI
-rw-r--r--.goreleaser.yml4
-rw-r--r--Makefile27
2 files changed, 18 insertions, 13 deletions
diff --git a/.goreleaser.yml b/.goreleaser.yml
index a76f758..b83bbef 100644
--- a/.goreleaser.yml
+++ b/.goreleaser.yml
@@ -14,7 +14,7 @@ builds:
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.buildTime={{.Date}}`.
brews:
- - github:
+ - repository:
owner: wagoodman
name: homebrew-dive
homepage: "https://github.com/wagoodman/dive/"
@@ -37,7 +37,7 @@ nfpms:
dockers:
-
- binaries:
+ ids:
- dive
dockerfile: Dockerfile
# todo: on 1.0 remove 'v' prefix
diff --git a/Makefile b/Makefile
index ccdd8a7..b5cb57f 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ BUILD_DIR = ./dist/dive_linux_amd64
BUILD_PATH = $(BUILD_DIR)/$(BIN)
PWD := ${CURDIR}
PRODUCTION_REGISTRY = docker.io
+SHELL = /bin/bash -o pipefail
TEST_IMAGE = busybox:latest
all: gofmt clean build
@@ -19,10 +20,12 @@ ci-static-analysis:
golangci-lint run
ci-install-go-tools:
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sudo sh -s -- -b /usr/local/bin/ latest
+ mkdir -p ${HOME}/.local/bin
+ curl -sfL https://goreleaser.com/static/run > ${HOME}/.local/bin/goreleaser
+ chmod +x ${HOME}/.local/bin/goreleaser
ci-install-ci-tools:
- curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sudo sh -s -- -b /usr/local/bin/ "v0.122.0"
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${HOME}/.local/bin/
ci-docker-login:
echo '${DOCKER_PASSWORD}' | docker login -u '${DOCKER_USERNAME}' --password-stdin '${PRODUCTION_REGISTRY}'
@@ -31,16 +34,16 @@ ci-docker-logout:
docker logout '${PRODUCTION_REGISTRY}'
ci-publish-release:
- goreleaser --rm-dist
+ goreleaser --clean
ci-build-snapshot-packages:
goreleaser \
--snapshot \
--skip-publish \
- --rm-dist
+ --clean
ci-release:
- goreleaser release --rm-dist
+ goreleaser release --clean
# todo: add --pull=never when supported by host box
ci-test-production-image:
@@ -87,18 +90,20 @@ ci-test-rpm-package-install:
"
ci-test-linux-run:
- chmod 755 ./dist/dive_linux_amd64/dive && \
- ./dist/dive_linux_amd64/dive '${TEST_IMAGE}' --ci && \
- ./dist/dive_linux_amd64/dive --source docker-archive .data/test-kaniko-image.tar --ci --ci-config .data/.dive-ci
+ ls -la ./dist
+ ls -la ./dist/dive_linux_amd64_v1
+ chmod 755 ./dist/dive_linux_amd64_v1/dive && \
+ ./dist/dive_linux_amd64_v1/dive '${TEST_IMAGE}' --ci && \
+ ./dist/dive_linux_amd64_v1/dive --source docker-archive .data/test-kaniko-image.tar --ci --ci-config .data/.dive-ci
# we're not attempting to test docker, just our ability to run on these systems. This avoids setting up docker in CI.
ci-test-mac-run:
- chmod 755 ./dist/dive_darwin_amd64/dive && \
- ./dist/dive_darwin_amd64/dive --source docker-archive .data/test-docker-image.tar --ci --ci-config .data/.dive-ci
+ chmod 755 ./dist/dive_darwin_amd64_v1/dive && \
+ ./dist/dive_darwin_amd64_v1/dive --source docker-archive .data/test-docker-image.tar --ci --ci-config .data/.dive-ci
# we're not attempting to test docker, just our ability to run on these systems. This avoids setting up docker in CI.
ci-test-windows-run:
- ./dist/dive_windows_amd64/dive --source docker-archive .data/test-docker-image.tar --ci --ci-config .data/.dive-ci
+ ./dist/dive_windows_amd64_v1/dive --source docker-archive .data/test-docker-image.tar --ci --ci-config .data/.dive-ci