diff --git a/.dockerignore b/.dockerignore index dfb2238822..c203446000 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,3 @@ temp/ build/ -dist/ *.md \ No newline at end of file diff --git a/.github/workflows/goreleaser-latest.yml b/.github/workflows/goreleaser-latest.yml index 0421501caf..0edfaef3ee 100644 --- a/.github/workflows/goreleaser-latest.yml +++ b/.github/workflows/goreleaser-latest.yml @@ -37,16 +37,6 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: "Move dist to prevent dockerignore" - run: | - echo "dist contents: $(ls dist)" - if [ ! -d "dist" ]; then - echo "❌ expected dist dir to be generated from make release-snapshot" && exit 1 - else echo "dist dir exists as expected." - fi - rm -rf dist-temp - cp -r dist dist-temp - - name: Build and push versioned image uses: docker/build-push-action@v5 with: diff --git a/contrib/docker/goreleaser.Dockerfile b/contrib/docker/goreleaser.Dockerfile index baac3233e4..8d9c5432fe 100644 --- a/contrib/docker/goreleaser.Dockerfile +++ b/contrib/docker/goreleaser.Dockerfile @@ -1,7 +1,7 @@ FROM golang:1.21 AS builder WORKDIR /root -COPY ./dist-temp/ /root/ +COPY ./dist/ /root/ ARG TARGETARCH RUN if [ "${TARGETARCH}" = "arm64" ]; then \ @@ -10,7 +10,7 @@ RUN if [ "${TARGETARCH}" = "arm64" ]; then \ cp linux_linux_amd64_v1/nibid /root/nibid; \ fi -FROM alpine +FROM alpine:latest WORKDIR /root RUN apk --no-cache add ca-certificates diff --git a/contrib/make/release.mk b/contrib/make/release.mk index cf9bfe0f4b..e0b2949088 100644 --- a/contrib/make/release.mk +++ b/contrib/make/release.mk @@ -5,16 +5,10 @@ PACKAGE_NAME := github.com/NibiruChain/nibiru GOLANG_CROSS_VERSION ?= v1.21.5 -verify-dist-temp: - @if [ ! -d "dist-temp" ]; then \ - echo "dist-temp does not exist, please run release-snapshot first"; \ - exit 1; \ - fi - # The `make release` command is running a Docker container with the image # `gorelease/goreleaser-cross:${GOLANG_CROSS_VERSION}`. This command: # `-v "$(CURDIR)":/go/src/$(PACKAGE_NAME)`: mounts the current directory -# `release --rm-dist`: executes the release inside the directory +# `release --clean`: executes the release inside the directory release: verify-dist-temp docker run \ --rm \ @@ -24,7 +18,7 @@ release: verify-dist-temp -e CGO_ENABLED=1 \ -e GITHUB_TOKEN=${GITHUB_TOKEN} \ goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \ - release --rm-dist + release --clean release-snapshot: docker run \ @@ -35,6 +29,4 @@ release-snapshot: -w /go/src/$(PACKAGE_NAME) \ -e CGO_ENABLED=1 \ goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \ - release --clean --snapshot - rm -rf dist-temp - cp -r dist dist-temp + release --clean --snapshot \ No newline at end of file