Skip to content

Commit 181c46e

Browse files
committed
updated build script
1 parent 4a40461 commit 181c46e

File tree

4 files changed

+88
-78
lines changed

4 files changed

+88
-78
lines changed

Dockerfile

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM alpine:3
2+
3+
RUN apk update \
4+
&& apk add --no-cache curl ca-certificates \
5+
&& rm -rf /var/cache/apk/*
6+
7+
COPY rxtx /
8+
WORKDIR /
9+
ENTRYPOINT ["/rxtx"]

dockerfiles/amd64/Dockerfile

-5
This file was deleted.

dockerfiles/arm32v6/Dockerfile

-5
This file was deleted.

goreleaser.yml

+79-68
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,103 @@
1-
# Build customization
2-
build:
3-
main: ./rxtx.go
4-
binary: rxtx
1+
env:
2+
- GO111MODULE=on
3+
before:
4+
hooks:
5+
- go mod download
56

6-
ldflags: -a -installsuffix cgo
7+
builds:
8+
- id: rxtx
9+
main: ./rxtx.go
10+
binary: rxtx
711

8-
env:
9-
- CGO_ENABLED=0
12+
ldflags: -a -installsuffix cgo
1013

11-
# GOOS list to build in.
12-
# For more info refer to https://golang.org/doc/install/source#environment
13-
# Defaults are darwin and linux
14-
goos:
15-
- linux
16-
- darwin
14+
goos:
15+
- linux
16+
- darwin
17+
- windows
18+
goarch:
19+
- 386
20+
- amd64
21+
- arm
22+
- arm64
23+
goarm:
24+
- 6
25+
mod_timestamp: '{{ .CommitTimestamp }}'
26+
env:
27+
- CGO_ENABLED=0
28+
flags:
29+
- -trimpath
30+
- -tags=netgo
31+
- -a
32+
- -v
1733

18-
# GOARCH to build in.
19-
# For more info refer to https://golang.org/doc/install/source#environment
20-
# Defaults are 386 and amd64
21-
goarch:
22-
- amd64
23-
- arm
34+
checksum:
35+
name_template: '{{ .ProjectName }}_checksums.txt'
2436

25-
goarm:
26-
- 6
37+
changelog:
38+
sort: asc
39+
filters:
40+
exclude:
41+
- '^docs:'
42+
- '^test:'
43+
- Merge pull request
44+
- Merge branch
45+
- go mod tidy
2746

28-
# Archive customization
29-
archive:
30-
# You can change the name of the archive.
31-
# This is parsed with Golang template engine and the following variables.
32-
name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}"
47+
archives:
48+
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
49+
replacements:
50+
darwin: Darwin
51+
linux: Linux
52+
windows: Windows
53+
386: i386
54+
amd64: x86_64
55+
format_overrides:
56+
- goos: windows
57+
format: zip
3358

34-
# Archive format. Valid options are `tar.gz` and `zip`.
35-
# Default is `zip`
36-
format: tar.gz
59+
nfpms:
60+
- file_name_template: '{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
61+
homepage: https://github.com/txn2/rxtx
62+
description: Queue based data collector, transmitter with store-and-forward. Useful for online/offline data collection, back pressure buffering or general queuing. REST / HTTP post.
63+
maintainer: Craig Johnston https://twitter.com/cjimti
64+
license: MIT License
65+
vendor: https://github.com/txn2
66+
formats:
67+
- apk
68+
- deb
69+
- rpm
3770

38-
# Additional files you want to add to the archive.
39-
# Defaults are any files matching `LICENCE*`, `LICENSE*`,
40-
# `README*` and `CHANGELOG*` (case-insensitive)
41-
files:
42-
- LICENSE
71+
release:
72+
github:
73+
owner: txn2
74+
name: rxtx
75+
name_template: "{{.ProjectName}}-v{{.Version}} {{.Env.USER}}"
4376

4477
dockers:
4578
-
4679
goos: linux
4780
goarch: amd64
4881
goarm: ''
49-
binaries:
50-
- rxtx
5182
image_templates:
5283
- "txn2/rxtx:latest"
5384
- "txn2/rxtx:{{ .Version }}"
5485
- "txn2/rxtx:{{ .Tag }}"
5586
- "txn2/rxtx:v{{ .Major }}"
56-
dockerfile: dockerfiles/amd64/Dockerfile
87+
dockerfile: Dockerfile
5788
build_flag_templates:
5889
- "--label=org.label-schema.schema-version=1.0"
5990
- "--label=org.label-schema.version={{.Version}}"
6091
- "--label=org.label-schema.name={{.ProjectName}}"
61-
-
62-
goos: linux
63-
goarch: arm
64-
goarm: 6
65-
binaries:
66-
- rxtx
67-
image_templates:
68-
- 'txn2/rxtx:arm32v6-latest'
69-
- 'txn2/rxtx:arm32v6-{{ .Version }}'
70-
- "txn2/rxtx:arm32v6-{{ .Tag }}"
71-
- "txn2/rxtx:arm32v6-v{{ .Major }}"
72-
dockerfile: dockerfiles/arm32v6/Dockerfile
73-
build_flag_templates:
74-
- "--label=org.label-schema.schema-version=1.0"
75-
- "--label=org.label-schema.version={{.Version}}"
76-
- "--label=org.label-schema.name={{.ProjectName}}"
77-
brew:
78-
name: rxtx
79-
80-
github:
81-
owner: txn2
82-
name: homebrew-tap
83-
84-
commit_author:
85-
name: Craig Johnston
86-
email: cjimti@gmail.com
87-
88-
folder: Formula
89-
90-
homepage: https://github.com/txn2/rxtx
9192

92-
description: "Data queuing, batching and re-transmission."
93+
brews:
94+
- name: rxtx
95+
tap:
96+
owner: txn2
97+
name: homebrew-tap
98+
commit_author:
99+
name: Craig Johnston
100+
email: cjimti@gmail.com
101+
folder: Formula
102+
homepage: https://github.com/txn2/rxtx
103+
description: "Data queuing, batching and re-transmission."

0 commit comments

Comments
 (0)