Skip to content

Commit 546c968

Browse files
author
Vic Shóstak
authored
Merge pull request #7 from create-go-app/dev
Dev -> v1.4.1
2 parents a92e25c + 99a4e0d commit 546c968

File tree

8 files changed

+91
-7
lines changed

8 files changed

+91
-7
lines changed

.dockerignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Files
2+
**/.DS_Store
3+
.dockerignore
4+
.editorconfig
5+
.gitattributes
6+
.gitignore
7+
Dockerfile
8+
LICENSE
9+
**/*_test.go
10+
*.yml
11+
*.md
12+
*.out
13+
14+
# Folders
15+
.git/
16+
.github/
17+
.task/
18+
app/
19+
tmp/

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,3 @@
1010
# Tests
1111
*.out
1212
**/tmp/
13-
14-
# Embed file
15-
**/blob.go

.goreleaser.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
project_name: cgapp
22
env_files:
33
github_token: ~/.goreleaser/github_token
4+
45
before:
56
hooks:
67
- go mod download
78
- go generate ./...
9+
810
builds:
911
- # Build macOS, Linux and Windows versions
1012
goos:
@@ -19,6 +21,26 @@ builds:
1921
- windows_amd64
2022
env:
2123
- CGO_ENABLED=0
24+
25+
dockers:
26+
# You can have multiple Docker images.
27+
- # GOOS of the built binary that should be used.
28+
goos: linux
29+
goarch: amd64
30+
31+
# Name templates of the built binaries that should be used.
32+
binaries:
33+
- cgapp
34+
35+
# Templates of the Docker image names.
36+
image_templates:
37+
- "koddr/cgapp:v{{ .Major }}"
38+
- "koddr/cgapp:{{ .Tag }}"
39+
- "koddr/cgapp:latest"
40+
41+
# Path to the Dockerfile (from the project root).
42+
dockerfile: Dockerfile
43+
2244
archives:
2345
- # Replacements for GOOS and GOARCH in the archive name.
2446
replacements:
@@ -27,7 +49,7 @@ archives:
2749
windows: Windows
2850
amd64: x86_64
2951

30-
# Can be used to change the archive formats for specific GOOSs.
52+
# Can be used to change the archive formats for specific GOOS.
3153
format_overrides:
3254
- goos: windows
3355
format: zip
@@ -36,10 +58,13 @@ archives:
3658
files:
3759
- LICENSE
3860
- README.md
61+
3962
checksum:
4063
name_template: "checksums.txt"
64+
4165
snapshot:
4266
name_template: "{{.Tag}}"
67+
4368
changelog:
4469
sort: asc
4570
filters:

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM alpine:3.12
2+
3+
LABEL maintainer="Vic Shóstak <[email protected]>"
4+
5+
# Copy Create Go App binary
6+
COPY cgapp /cgapp
7+
8+
# Install git
9+
RUN apk add --no-cache git npm
10+
11+
# Install frontend CLIs
12+
RUN npm i -g -s create-react-app preact-cli @vue/cli degit @angular/cli
13+
14+
# Set entry point to /cgapp
15+
ENTRYPOINT ["/cgapp"]

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</h1>
55
<p align="center">Create a new production-ready project with <b>backend</b> (Golang), <b>frontend</b> (JavaScript, TypeScript)<br/>and <b>deploy automation</b> (Ansible, Docker) by running one CLI command.<br/><br/>Focus on <b>writing</b> code and <b>thinking</b> of business-logic! The CLI will take care of the rest.</p>
66

7-
<p align="center"><a href="https://github.com/create-go-app/cli/releases" target="_blank"><img src="https://img.shields.io/badge/version-v1.4.0-blue?style=for-the-badge&logo=none" alt="cli version" /></a>&nbsp;<a href="https://pkg.go.dev/github.com/create-go-app/cli?tab=doc" target="_blank"><img src="https://img.shields.io/badge/Go-1.11+-00ADD8?style=for-the-badge&logo=go" alt="go version" /></a>&nbsp;<a href="https://gocover.io/github.com/create-go-app/cli/pkg/cgapp" target="_blank"><img src="https://img.shields.io/badge/Go_Cover-94%25-success?style=for-the-badge&logo=none" alt="go cover" /></a>&nbsp;<a href="https://goreportcard.com/report/github.com/create-go-app/cli" target="_blank"><img src="https://img.shields.io/badge/Go_report-A+-success?style=for-the-badge&logo=none" alt="go report" /></a>&nbsp;<img src="https://img.shields.io/badge/license-apache_2.0-red?style=for-the-badge&logo=none" alt="license" /></p>
7+
<p align="center"><a href="https://github.com/create-go-app/cli/releases" target="_blank"><img src="https://img.shields.io/badge/version-v1.4.1-blue?style=for-the-badge&logo=none" alt="cli version" /></a>&nbsp;<a href="https://pkg.go.dev/github.com/create-go-app/cli?tab=doc" target="_blank"><img src="https://img.shields.io/badge/Go-1.11+-00ADD8?style=for-the-badge&logo=go" alt="go version" /></a>&nbsp;<a href="https://gocover.io/github.com/create-go-app/cli/pkg/cgapp" target="_blank"><img src="https://img.shields.io/badge/Go_Cover-94%25-success?style=for-the-badge&logo=none" alt="go cover" /></a>&nbsp;<a href="https://goreportcard.com/report/github.com/create-go-app/cli" target="_blank"><img src="https://img.shields.io/badge/Go_report-A+-success?style=for-the-badge&logo=none" alt="go report" /></a>&nbsp;<img src="https://img.shields.io/badge/license-apache_2.0-red?style=for-the-badge&logo=none" alt="license" /></p>
88

99
## ⚡️ [Quick start](https://create-go.app/quick-start/)
1010

@@ -28,6 +28,16 @@ Okay, it works! Now, you can run this project on your **local machine** or deplo
2828
cgapp deploy
2929
```
3030

31+
### ~ Docker-way to quick start
32+
33+
If you don't want to install Create Go App CLI to your system, you feel free to using our official [Docker image](https://hub.docker.com/r/koddr/cgapp) and run CLI from isolated container:
34+
35+
```bash
36+
docker run --rm -it -v ${PWD}:${PWD} -w ${PWD} koddr/cgapp:latest
37+
```
38+
39+
> ☝️ Also, with this Docker image, you do **not** have to worry about installing tools/CLI of frontend UI libraries/frameworks. Everything is **already included** to this Docker image: `create-react-app`, `preact-cli`, `vue-cli`, `ng-cli` and `degit` (for Svelte).
40+
3141
That's all you need to start! 🎉
3242

3343
## 📖 [Official Documentation](https://create-go.app/)

Taskfile.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ tasks:
4040
- task: generate
4141
- go build -i -o $GOPATH/bin/cgapp ./*.go
4242

43+
docker-image:
44+
desc: Build Docker image with full features
45+
cmds:
46+
- task: build
47+
- docker build . -t koddr/cgapp
48+
4349
release:
4450
desc: GitHub release for CLI
4551
cmds:
@@ -57,4 +63,4 @@ tasks:
5763
update-pkg-cache:
5864
desc: Update pkg.go.dev cache for a new version
5965
cmds:
60-
- GOPROXY=https://proxy.golang.org GO111MODULE=on go get github.com/create-go-app/cli@{{.VERSION}}
66+
- curl -i https://proxy.golang.org/github.com/create-go-app/cli/@v/{{.VERSION}}.info

pkg/embed/blob.go

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/registry/defaults.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import "github.com/AlecAivazis/survey/v2"
3030

3131
const (
3232
// CLIVersion version of Create Go App CLI.
33-
CLIVersion = "1.4.0"
33+
CLIVersion = "1.4.1"
3434
// RegexpAnsiblePattern pattern for Ansible roles.
3535
RegexpAnsiblePattern = "^(deploy)$"
3636
// RegexpBackendPattern pattern for backend.

0 commit comments

Comments
 (0)