Skip to content

Commit

Permalink
go releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
F1bonacc1 committed Dec 17, 2022
1 parent 70fd817 commit fea0d86
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ process-compose

# nix build .#process-compose output
result

dist/
/exports
55 changes: 55 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
# - go generate ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- "386"
- amd64
- arm64
- arm
ignore:
- goos: darwin
goarch: "386"
- goos: darwin
goarch: arm
- goos: windows
goarch: "386"
- goos: windows
goarch: arm
dir: src
ldflags:
- -X github.com/f1bonacc1/process-compose/src/config.Version={{.Tag}} -X github.com/f1bonacc1/process-compose/src/config.CheckForUpdates=true -s -w
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: '{{ .ProjectName }}_checksums.txt'
snapshot:
name_template: "{{ .Version }}-SNAPSHOT-{{.ShortCommit}}"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
release:
draft: true
replace_existing_draft: true
# modelines, feel free to remove those if you don't want/use them:
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ RM=rm
VERSION = $(shell git describe --abbrev=0)
NUMVER = $(shell echo ${VERSION} | cut -d"v" -f 2)
PKG = github.com/f1bonacc1/process-compose

SHELL := /bin/bash
LD_FLAGS := -ldflags="-X ${PKG}/src/config.Version=${VERSION} -X ${PKG}/src/config.CheckForUpdates=true -s -w"

ifeq ($(OS),Windows_NT)
Expand Down Expand Up @@ -55,3 +55,6 @@ run:

clean:
$(RM) bin/${NAME}*
release:
source exports
goreleaser release --rm-dist --skip-validate
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.19
require (
github.com/InVisionApp/go-health/v2 v2.1.3
github.com/adrg/xdg v0.4.0
github.com/f1bonacc1/glippy v0.0.0-20221207220753-a53cdbf9bae7
github.com/fatih/color v1.13.0
github.com/gdamore/tcell/v2 v2.5.3
github.com/gin-gonic/gin v1.8.1
Expand All @@ -20,7 +21,6 @@ replace github.com/InVisionApp/go-health/v2 => github.com/f1bonacc1/go-health/v2
require (
github.com/InVisionApp/go-logger v1.0.1 // indirect
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/f1bonacc1/glippy v0.0.0-20221207220753-a53cdbf9bae7 // indirect
github.com/gdamore/encoding v1.0.0 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
Expand Down

0 comments on commit fea0d86

Please sign in to comment.