Skip to content

Commit d6dd547

Browse files
authored
Create testtrack directory when generating build timestamp (#54)
* Create testtrack directory when generating build timestamp * Bump testtrack-cli to 1.1.1
1 parent cbead5c commit d6dd547

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

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.0
3+
VERSION=1.1.1
44
BUILD=`git rev-parse HEAD`
55

66
LDFLAGS=-ldflags "-w -s \

cmds/generate_build_timestamp.go

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

33
import (
44
"io/ioutil"
5+
"os"
56
"time"
67

78
"github.com/spf13/cobra"
@@ -30,5 +31,10 @@ var generateBuildTimestampCmd = &cobra.Command{
3031
func generateBuildTimestamp() error {
3132
timestamp := []byte(time.Now().UTC().Format("2006-01-02T15:04:05Z"))
3233

34+
err := os.MkdirAll("testtrack", 0755)
35+
if err != nil {
36+
return err
37+
}
38+
3339
return ioutil.WriteFile("testtrack/build_timestamp", timestamp, 0644)
3440
}

0 commit comments

Comments
 (0)