Skip to content

Commit

Permalink
fix: include .dockerignore and .gitignore on web template and release…
Browse files Browse the repository at this point in the history
… v1.0.9
  • Loading branch information
carlosstrand committed Jul 25, 2021
1 parent 991186f commit 9df5995
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
1 change: 0 additions & 1 deletion cmd/zepto/_templates/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ RUN apk update && \
go get -u github.com/go-zepto/zepto-cli/cmd/zepto && \
export PATH=$PATH:/usr/local/go/bin && \
npm install && \
npm rebuild node-sass && \
go mod tidy && \
zepto build

Expand Down
File renamed without changes.
File renamed without changes.
11 changes: 10 additions & 1 deletion commands/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,20 @@ func ExecuteWeb(templates embed.FS, args []string) {
utils.ReplaceTextOnFile(path.Join(projectDir, "Dockerfile"), DEFAULT_DOCKER_GO_ZEPTO_PATH, DEFAULT_DOCKER_GO_ZEPTO_PATH+"@v"+zeptocli.VERSION)
fmt.Println("Preparing go mod...")
s.Start()
// Renaming go mod since it can't be embed
// Renaming files which can't be embed
err = os.Rename(path.Join(projectDir, "go.mod_"), path.Join(projectDir, "go.mod"))
if err != nil {
panic(err)
}
err = os.Rename(path.Join(projectDir, "gitignore"), path.Join(projectDir, ".gitignore"))
if err != nil {
panic(err)
}
err = os.Rename(path.Join(projectDir, "dockerignore"), path.Join(projectDir, ".dockerignore"))
if err != nil {
panic(err)
}
// Run Go Mod Tidy
GoModTidy(projectDir)
s.Stop()
fmt.Println("Installing npm packages...")
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package zeptocli

var VERSION = "1.0.8"
var VERSION = "1.0.9"

0 comments on commit 9df5995

Please sign in to comment.