Skip to content

Commit 5bfc88b

Browse files
author
Vic Shóstak
committed
Improve release process
1 parent 15f869b commit 5bfc88b

File tree

3 files changed

+12
-50
lines changed

3 files changed

+12
-50
lines changed

.goreleaser.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ before:
1111
# - go run github.com/google/wire/cmd/wire@latest
1212
- go run github.com/securego/gosec/v2/cmd/gosec@latest -quiet ./...
1313
- go run github.com/go-critic/go-critic/cmd/gocritic@latest check -enableAll ./...
14+
- go test -race ./...
1415

1516
builds:
1617
-
@@ -105,11 +106,13 @@ brews:
105106
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
106107
folder: Formula
107108
caveats: |
108-
Let's create a new project via interactive console UI (or CUI for short) in current folder:
109+
After install cgapp, let's create a new project via interactive console UI (or CUI for short) in current folder:
109110
110111
$ cgapp create
111112

112-
Next, open the generated Ansible inventory file (called hosts.ini) and fill in the variables according to your server configuration. And you're ready to automatically deploy this project:
113+
Next, open the generated Ansible inventory file (called hosts.ini) and fill in the variables according to your server configuration.
114+
115+
And you're ready to automatically deploy this project:
113116

114117
$ cgapp deploy
115118

@@ -120,8 +123,9 @@ brews:
120123
Focus on writing code and thinking of business-logic! The CLI will take care of the rest.
121124
license: Apache 2.0
122125
skip_upload: false
123-
# dependencies:
124-
# - name: git
126+
dependencies:
127+
- name: git
128+
- name: npm
125129

126130
dockers:
127131
-
@@ -152,7 +156,7 @@ nfpms:
152156
homepage: "https://github.com/create-go-app/cli"
153157
license: Apache 2.0
154158
formats: [ deb, rpm, apk, archlinux ]
155-
# dependencies: [ git ]
159+
dependencies: [ git, npm ]
156160

157161
archives:
158162
-

Dockerfile

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,3 @@
1-
# Use this file for build a normal Docker/Podman image for Create Go App CLI.
2-
3-
FROM golang:1.17-alpine AS builder
4-
5-
LABEL maintainer="Vic Shóstak <[email protected]>"
6-
7-
# Move to working directory (/build).
8-
WORKDIR /build
9-
10-
# Copy and download dependency using go mod.
11-
COPY go.mod go.sum ./
12-
RUN go mod download
13-
14-
# Copy the code into the container.
15-
COPY . .
16-
17-
# Set necessary environment variables needed for our image and build the Create Go App CLI
18-
ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64
19-
RUN go build -ldflags="-s -w" -o cgapp cmd/cgapp/main.go
20-
21-
FROM alpine:edge
22-
23-
# Copy binary and config files from /build to root folder of scratch container.
24-
COPY --from=builder ["/build/cgapp", "/"]
25-
26-
# Install git, npm (with nodejs).
27-
RUN apk add --no-cache git npm
28-
29-
# Set entry point.
30-
ENTRYPOINT ["/cgapp"]
1+
FROM scratch
2+
ENTRYPOINT ["/cgapp"]
3+
COPY cgapp /

Dockerfile.goreleaser

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)