Compare commits

..

No commits in common. "8a6734fba325ead97c46749b03d91be4d9744ec6" and "38f64dcb9293ee5fce323d14083be9cc8d75e918" have entirely different histories.

3 changed files with 1 additions and 74 deletions

View File

@ -1,26 +0,0 @@
when:
event: pull_request
branch: main
matrix:
include:
- IMAGE: golang:1.20-alpine
PACKAGE_MANAGER: apk
INSTALL_CMD: "add --no-cache"
PACKAGE: "make alpine-sdk g++"
- IMAGE: golang:latest
PACKAGE_MANAGER: apt
INSTALL_CMD: "upgrade -y"
PACKAGE: ""
steps:
prepare-build:
image: ${IMAGE}
commands:
- ${PACKAGE_MANAGER} update
- ${PACKAGE_MANAGER} ${INSTALL_CMD} ${PACKAGE}
- make dep
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
- make lint
- make fmt

View File

@ -1,27 +0,0 @@
when:
event: tag
branch: main
steps:
build:
image: golang:1.20-alpine
commands:
- apk update
- apk add --no-cache make alpine-sdk g++
- make build
- echo "$${CI_COMMIT_TAG}"
- make release
release:
image: woodpeckerci/plugin-gitea-release
settings:
base_url: https://git.iratusmachina.com
files:
- "artifacts/*.tar.gz"
file-exists: overwrite
api_key:
from_secret: gitea_release_token
draft: true
skip_verify: true
target: main
checksum: sha256

View File

@ -1,15 +1,6 @@
# Inspired from https://dustinspecker.com/posts/go-combined-unit-integration-code-coverage/ and https://netdevops.me/2023/test-coverage-for-go-integration-tests/
BIN_DIR = $(CURDIR)/artifacts
BIN_DIR = $(CURDIR)/bin
BINARY = $(BIN_DIR)/lyricdownloader
CURRENT_DIR = $(shell pwd)
CUR_TAG = $(shell git tag | sort -g | tail -1 | cut -c 2-)
VERSION_NUMBER ?= 0.0.0
ifneq ($(CI_COMMIT_TAG),)
VERSION_NUMBER := $(CI_COMMIT_TAG:v%=%)
else
VERSION_NUMBER := ${CUR_TAG}
endif
.PHONY: clean
clean:
@ -31,17 +22,6 @@ lint:
build:
go build -o $(BINARY)
.PHONY: release
release:
mv ${BINARY} ${BINARY}-${VERSION_NUMBER}
cd ${BIN_DIR}
mkdir ${BIN_DIR}/tmp
mv ${BINARY}-${VERSION_NUMBER} ${BIN_DIR}/tmp
# From here https://www.baeldung.com/linux/tar-archive-without-directory-structure
tar -zcvf ${BINARY}-${VERSION_NUMBER}.tar.gz -C ${BIN_DIR}/tmp .
rm -rf ${BIN_DIR}/tmp
cd ${CURRENT_DIR}
.PHONY: lint-all
lint-all:
golangci-lint run --enable-all