Skip to content

Commit

Permalink
Add release config
Browse files Browse the repository at this point in the history
  • Loading branch information
mugli committed Jul 26, 2019
1 parent 0fd7d6c commit 03895c3
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/png2escpos
/dist
40 changes: 40 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
project_name: png2escpos

before:
hooks:
- go mod download

builds:
- env:
- CGO_ENABLED=0
goos:
- darwin
- linux
ignore:
- goos: darwin
goarch: 386

archives:
- replacements:
darwin: Darwin
linux: Linux
386: i386
amd64: x86_64
format_overrides:
- goos: darwin
format: zip

checksum:
name_template: 'checksums.txt'

snapshot:
name_template: '{{ .Tag }}-next'

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
6 changes: 6 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

export GOPROXY=https://gocenter.io

go mod download
go build png2escpos.go
3 changes: 0 additions & 3 deletions png2escpos.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ func main() {
func showHelp() {
help := `
▄▄▄▄▄▄▄ ▄▄ ▄ ▄▄▄▄▄▄▄
█ ▄▄▄ █ ▄▀▄ █ █ ▄▄▄ █
█ ███ █ █▄▄▀ █ ███ █
Expand Down Expand Up @@ -64,8 +63,6 @@ and then encodes in ESC/POS format.
Linux: ./png2escpos <file.png> > socat STDIN TCP4:192.168.1.100:9100
macOS: ./png2escpos <file.png> | socat STDIN TCP4:192.168.1.100:9100
(you may have to install socat on macOS with brew install socat first)
Other commands:
Expand Down
12 changes: 12 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

export GOPROXY=https://gocenter.io

# Tag manually first
# git tag -a v0.1.0 -m "First release"
# git push origin v0.1.0

# For dry run:
# goreleaser --snapshot --skip-publish --rm-dist

goreleaser release --rm-dist

0 comments on commit 03895c3

Please sign in to comment.