mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-21 19:39:43 +01:00
Start making builds with goreleaser
This commit is contained in:
parent
e38d42c1ce
commit
7f06f25c15
1
.gitignore
vendored
1
.gitignore
vendored
@ -108,3 +108,4 @@ _testmain.go
|
||||
_test
|
||||
oragono.prof
|
||||
oragono.mprof
|
||||
/dist
|
||||
|
44
.goreleaser.yml
Normal file
44
.goreleaser.yml
Normal file
@ -0,0 +1,44 @@
|
||||
# .goreleaser.yml
|
||||
# Build customization
|
||||
project_name: oragono
|
||||
builds:
|
||||
- main: oragono.go
|
||||
binary: oragono
|
||||
goos:
|
||||
- freebsd
|
||||
- windows
|
||||
- darwin
|
||||
- linux
|
||||
goarch:
|
||||
- amd64
|
||||
- arm
|
||||
- arm64
|
||||
goarm:
|
||||
- 6
|
||||
- 7
|
||||
ignore:
|
||||
- goos: windows
|
||||
goarch: arm
|
||||
- goos: darwin
|
||||
goarch: arm
|
||||
- goos: freebsd
|
||||
goarch: arm
|
||||
- goos: freebsd
|
||||
goarch: arm64
|
||||
archive:
|
||||
name_template: "{{ .ProjectName }}-{{ .Version }}-{{ .Os }}{{ if .Arm }}-{{ .Arch }}v{{ .Arm }}{{ end }}"
|
||||
format: tar.gz
|
||||
replacements:
|
||||
amd64: x64
|
||||
darwin: osx
|
||||
format_overrides:
|
||||
- goos: windows
|
||||
format: zip
|
||||
files:
|
||||
- README
|
||||
- CHANGELOG.md
|
||||
- oragono.motd
|
||||
- oragono.yaml
|
||||
- docs/*
|
||||
checksum:
|
||||
name_template: "{{ .ProjectName }}-{{ .Version }}-checksums.txt"
|
50
Makefile
50
Makefile
@ -1,55 +1,13 @@
|
||||
BUILD=./build
|
||||
WIN=$(BUILD)/win
|
||||
LINUX=$(BUILD)/linux
|
||||
OSX=$(BUILD)/osx
|
||||
ARM6=$(BUILD)/arm
|
||||
SOURCE=oragono.go
|
||||
VERS=XXX
|
||||
.PHONY: all clean build
|
||||
|
||||
.PHONY: all clean windows osx linux arm6
|
||||
|
||||
add-files = mkdir -p $1; \
|
||||
cp oragono.yaml $1; \
|
||||
cp oragono.motd $1; \
|
||||
cp LICENSE $1; \
|
||||
cp ./docs/README $1; \
|
||||
mkdir -p $1/docs; \
|
||||
cp ./CHANGELOG.md $1/docs/; \
|
||||
cp ./docs/*.md $1/docs/; \
|
||||
cp ./docs/logo* $1/docs/;
|
||||
|
||||
all: clean windows osx linux arm6
|
||||
all: clean build
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD)
|
||||
mkdir -p $(BUILD)
|
||||
|
||||
windows:
|
||||
GOOS=windows GOARCH=amd64 go build $(SOURCE)
|
||||
$(call add-files,$(WIN))
|
||||
mv oragono.exe $(WIN)
|
||||
cd $(WIN) && zip -r ../oragono-$(VERS)-windows.zip *
|
||||
|
||||
osx:
|
||||
GOOS=darwin GOARCH=amd64 go build $(SOURCE)
|
||||
$(call add-files,$(OSX))
|
||||
mv oragono $(OSX)
|
||||
cd $(OSX) && tar -czvf ../oragono-$(VERS)-osx.tgz *
|
||||
|
||||
linux:
|
||||
GOOS=linux GOARCH=amd64 go build $(SOURCE)
|
||||
$(call add-files,$(LINUX))
|
||||
mv oragono $(LINUX)
|
||||
cd $(LINUX) && tar -czvf ../oragono-$(VERS)-linux.tgz *
|
||||
|
||||
arm6:
|
||||
GOARM=6 GOARCH=arm go build $(SOURCE)
|
||||
$(call add-files,$(ARM6))
|
||||
mv oragono $(ARM6)
|
||||
cd $(ARM6) && tar -czvf ../oragono-$(VERS)-arm.tgz *
|
||||
|
||||
deps:
|
||||
go get -v -d
|
||||
build:
|
||||
goreleaser --snapshot --rm-dist
|
||||
|
||||
test:
|
||||
cd irc && go test .
|
||||
|
Loading…
Reference in New Issue
Block a user