-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.goreleaser.yaml
137 lines (128 loc) · 3.55 KB
/
.goreleaser.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
project_name: clace
release:
github:
owner: claceio
name: clace
name_template: "Release {{.Tag}}"
draft: true
prerelease: "auto"
before:
hooks:
- go mod download
- go mod tidy
- git clone --single-branch --depth 1 https://github.com/claceio/appspecs.git
- rm -rf appspecs/.git
- rm -rf internal/server/appspecs
- mv appspecs internal/server
- git clone --single-branch --depth 1 https://github.com/claceio/apps.git
- cp internal/server/list_apps/embed.go .
- rm -rf internal/server/list_apps
- mv apps/clace/list_apps internal/server
- mv embed.go internal/server/list_apps/
- rm -rf apps
- go test -race ./...
builds:
- main: ./cmd/clace
binary: clace
flags:
- -trimpath
ldflags:
- -w
- -X main.gitCommit={{.ShortCommit}}
- -X main.gitVersion={{.Version}}
env:
- GO111MODULE=on
- CGO_ENABLED=0
goos:
- darwin
- linux
- windows
- freebsd
goarch:
- amd64
- arm64
ignore:
- goos: freebsd
goarch: arm64
- goos: windows
goarch: arm64
nfpms:
- file_name_template: "{{.ProjectName}}-{{.Tag}}-{{.Arch}}{{if .Arm}}{{.Arm}}{{end}}"
homepage: https://clace.io/
description: Securely develop and deploy internal applications
maintainer: Ajay Kidave <[email protected]>
license: Apache 2.0
vendor: ClaceIO LLC.
formats:
- deb
- rpm
contents:
- src: /usr/bin/clace
dst: /usr/local/bin/clace
type: "symlink"
checksum:
name_template: "SHA256SUMS"
algorithm: sha256
archives:
- name_template: "{{.ProjectName}}-{{.Tag}}-{{.Os}}-{{.Arch}}{{if .Arm}}{{.Arm}}{{end}}"
wrap_in_directory: true
format: zip
files:
- README.md
- LICENSE
- name_template: "{{.ProjectName}}-{{.Tag}}-{{.Os}}-{{.Arch}}{{if .Arm}}{{.Arm}}{{end}}"
id: targz-archives
wrap_in_directory: true
format: tar.gz
files:
- README.md
- LICENSE
# https://goreleaser.com/customization/changelog/
changelog:
skip: false
use: github
sort: asc
groups:
- title: "New Features"
regexp: "^.*feat[(\\w)]*:+.*$"
order: 0
- title: "Bug Fixes"
regexp: "^.*fix[(\\w)]*:+.*$"
order: 10
- title: "Dependencies"
regexp: "^.*deps[(\\w)]*:+.*$"
order: 30
- title: Other
order: 999
brews:
- name: clace
homepage: https://clace.io
ids: [targz-archives]
repository:
owner: claceio
name: homebrew-clace
dependencies:
- name: "mkcert"
service: |
run [ opt_bin/"clace", "server", "start" ]
keep_alive true
working_dir HOMEBREW_PREFIX
log_path var/"log/clace.log"
error_log_path var/"log/clace.log"
skip_upload: auto
install: |-
bin.install "clace"
post_install: |-
unless File.exist?("#{etc}/clace.toml")
pid = spawn("#{opt_bin}/clace password", out: "#{etc}/clace.toml")
puts "********** Initializing \"admin\" user **********"
Process.wait(pid)
puts "************* Save this password ****************"
mkcert_path = `which mkcert`.chomp
unless mkcert_path.empty?
system("mkdir -p #{HOMEBREW_PREFIX}/var/clace/config/certificates")
system("#{mkcert_path} -install")
system("#{mkcert_path} -cert-file #{HOMEBREW_PREFIX}/var/clace/config/certificates/default.crt -key-file #{HOMEBREW_PREFIX}/var/clace/config/certificates/default.key localhost 127.0.0.1 \"*.localhost\"")
puts "Created localhost TLS certificates"
end
end