Skip to content

Commit 4af99b6

Browse files
authored
Write a gitignore when initializing a project (#55)
* Bump version to 1.1.2
1 parent 4115135 commit 4af99b6

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SHELL = /bin/sh
22

3-
VERSION=1.1.1
3+
VERSION=1.1.2
44
BUILD=`git rev-parse HEAD`
55

66
LDFLAGS=-ldflags "-w -s \

cmds/init_project.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package cmds
22

33
import (
4+
"io/ioutil"
45
"log"
56
"os"
67

@@ -39,6 +40,10 @@ func initProject() error {
3940
}
4041
keepfile.Close()
4142

43+
if err := ioutil.WriteFile("testtrack/.gitignore", []byte("build_timestamp\n"), 0644); err != nil {
44+
log.Fatal(err)
45+
}
46+
4247
_, err = schema.Generate()
4348
return err
4449
}

0 commit comments

Comments
 (0)