Fix version tagging and remove release uploads
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is failing

Binaries are being rejected for now. Need up update my Gitea
This commit is contained in:
IamTheFij 2020-12-01 19:41:15 -08:00
parent 533f4963be
commit 016129b5ed
2 changed files with 33 additions and 33 deletions

View File

@ -39,22 +39,22 @@ steps:
commands:
- make build-all-static
- name: gitea release
image: plugins/gitea-release
settings:
title: ${DRONE_TAG}
files: dist/*
checksum:
- md5
- sha1
- sha256
- sha512
base_url:
from_secret: gitea_base_url
api_key:
from_secret: gitea_token
when:
event: tag
# - name: gitea release
# image: plugins/gitea-release
# settings:
# title: ${DRONE_TAG}
# files: dist/*
# checksum:
# - md5
# - sha1
# - sha256
# - sha512
# base_url:
# from_secret: gitea_base_url
# api_key:
# from_secret: gitea_token
# when:
# event: tag
- name: push image - arm
image: plugins/docker

View File

@ -3,7 +3,7 @@ OUTPUT ?= dist/$(NAME)
DOCKER_TAG ?= $(NAME)-dev-${USER}
GIT_TAG_NAME := $(shell git tag -l --contains HEAD)
GIT_SHA := $(shell git rev-parse HEAD)
VERSION := $(if $(GIT_TAG_NAME),$(GIT_TAG_NAME),$(GIT_SHA))
VERSION ?= $(if $(GIT_TAG_NAME),$(GIT_TAG_NAME),$(GIT_SHA))
GOFILES = *.go go.mod go.sum
@ -42,7 +42,7 @@ check:
# Output target
$(OUTPUT): $(GOFILES)
@echo Version: $(VERSION)
go build -ldflags '-X "main.version=${VERSION}"' -o $(OUTPUT)
go build -ldflags '-X "main.version=$(VERSION)"' -o $(OUTPUT)
# Alias for building
.PHONY: build
@ -50,22 +50,22 @@ build: $(OUTPUT)
$(OUTPUT)-darwin-amd64: $(GOFILES)
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 \
go build -ldflags '-X "main.version=${VERSION}"' -a -installsuffix nocgo \
go build -ldflags '-X "main.version=$(VERSION)"' -a -installsuffix nocgo \
-o $(OUTPUT)-darwin-amd64
$(OUTPUT)-linux-amd64: $(GOFILES)
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 \
go build -ldflags '-X "main.version=${VERSION}"' -a -installsuffix nocgo \
go build -ldflags '-X "main.version=$(VERSION)"' -a -installsuffix nocgo \
-o $(OUTPUT)-linux-amd64
$(OUTPUT)-linux-arm: $(GOFILES)
GOOS=linux GOARCH=arm CGO_ENABLED=0 \
go build -ldflags '-X "main.version=${VERSION}"' -a -installsuffix nocgo \
go build -ldflags '-X "main.version=$(VERSION)"' -a -installsuffix nocgo \
-o $(OUTPUT)-linux-arm
$(OUTPUT)-linux-arm64: $(GOFILES)
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 \
go build -ldflags '-X "main.version=${VERSION}"' -a -installsuffix nocgo \
go build -ldflags '-X "main.version=$(VERSION)"' -a -installsuffix nocgo \
-o $(OUTPUT)-linux-arm64
.PHONY: build-linux-static
@ -87,16 +87,16 @@ clean-vendor:
.PHONY: docker-build
docker-build: $(OUTPUT)-linux-amd64
docker build . -t ${DOCKER_TAG}-linux-amd64
docker build . -t $(DOCKER_TAG)-linux-amd64
# Cross build for arm architechtures
.PHONY: docker-build-arm
docker-build-arm: $(OUTPUT)-linux-arm
docker build --build-arg REPO=arm32v7 --build-arg ARCH=arm . -t ${DOCKER_TAG}-linux-arm
docker build --build-arg REPO=arm32v7 --build-arg ARCH=arm . -t $(DOCKER_TAG)-linux-arm
.PHONY: docker-build-arm
docker-build-arm64: $(OUTPUT)-linux-arm64
docker build --build-arg REPO=arm64v8 --build-arg ARCH=arm64 . -t ${DOCKER_TAG}-linux-arm64
docker build --build-arg REPO=arm64v8 --build-arg ARCH=arm64 . -t $(DOCKER_TAG)-linux-arm64
.PHONY: docker-run
docker-run: docker-build
@ -105,28 +105,28 @@ docker-run: docker-build
# Cross run on host architechture
.PHONY: docker-run-arm
docker-run-arm: docker-build-arm
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock --name $(DOCKER_TAG)-run ${DOCKER_TAG}-linux-arm
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock --name $(DOCKER_TAG)-run $(DOCKER_TAG)-linux-arm
.PHONY: docker-run-arm64
docker-run-arm64: docker-build-arm64
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock --name $(DOCKER_TAG)-run ${DOCKER_TAG}-linux-arm64
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock --name $(DOCKER_TAG)-run $(DOCKER_TAG)-linux-arm64
# Multi stage builds
.PHONY: docker-staged-build
docker-staged-build:
docker build --build-arg VERSION=${VERSION} \
-t ${DOCKER_TAG}-linux-amd64 \
docker build --build-arg VERSION=$(VERSION) \
-t $(DOCKER_TAG)-linux-amd64 \
-f Dockerfile.multi-stage .
# Cross build for arm architechtures
.PHONY: docker-staged-build-arm
docker-staged-build-arm:
docker build --build-arg VERSION=${VERSION} \
--build-arg REPO=arm32v7 --build-arg ARCH=arm -t ${DOCKER_TAG}-linux-arm \
docker build --build-arg VERSION=$(VERSION) \
--build-arg REPO=arm32v7 --build-arg ARCH=arm -t $(DOCKER_TAG)-linux-arm \
-f Dockerfile.multi-stage .
.PHONY: docker-staged-build-arm
docker-staged-build-arm64:
docker build --build-arg VERSION=${VERSION} \
--build-arg REPO=arm64v8 --build-arg ARCH=arm64 -t ${DOCKER_TAG}-linux-arm64 \
docker build --build-arg VERSION=$(VERSION) \
--build-arg REPO=arm64v8 --build-arg ARCH=arm64 -t $(DOCKER_TAG)-linux-arm64 \
-f Dockerfile.multi-stage .