Skip to content

Commit

Permalink
1.2.5: Fix build STGZ on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fcharlie committed Apr 12, 2021
1 parent 89c5c82 commit 1ce38ef
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Project file `bali.toml`:
```toml
# https://toml.io/en/
name = "bali"
version = "1.2.4"
version = "1.2.5"
dirs = [
"cmd/bali", # dirs
]
Expand Down Expand Up @@ -173,7 +173,7 @@ Program build file `balisrc.toml`:
name = "bali"
description = "Bali - Minimalist Golang build and packaging tool"
destination = "bin"
version = "1.2.4"
version = "1.2.5"
versioninfo = "res/versioninfo.json"
icon = "res/bali.ico"
manifest = "res/bali.manifest"
Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Bali 同时支持 TOML 或者 JSON 格式的项目文件,JSON 使用内置解
```toml
# https://toml.io/en/
name = "bali"
version = "1.2.4"
version = "1.2.5"
dirs = [
"cmd/bali", # dirs
]
Expand Down Expand Up @@ -155,7 +155,7 @@ norename = true
name = "bali"
description = "Bali - Minimalist Golang build and packaging tool"
destination = "bin"
version = "1.2.4"
version = "1.2.5"
versioninfo = "res/versioninfo.json"
icon = "res/bali.ico"
manifest = "res/bali.manifest"
Expand Down
2 changes: 1 addition & 1 deletion bali.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bali",
"version": "1.2.4",
"version": "1.2.5",
"files": [
{
"path": "LICENSE",
Expand Down
2 changes: 1 addition & 1 deletion bali.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://toml.io/en/
name = "bali"
version = "1.2.4"
version = "1.2.5"
dirs = [
"cmd/bali", # dirs
]
Expand Down
2 changes: 1 addition & 1 deletion cmd/bali/balisrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "bali",
"description": "Bali - Minimalist Golang build and packaging tool",
"destination": "bin",
"version": "1.2.4",
"version": "1.2.5",
"links": [
"bin/baligo"
],
Expand Down
2 changes: 1 addition & 1 deletion cmd/bali/balisrc.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "bali"
description = "Bali - Minimalist Golang build and packaging tool"
destination = "bin"
version = "1.2.4"
version = "1.2.5"
versioninfo = "res/versioninfo.json"
icon = "res/bali.ico"
manifest = "res/bali.manifest"
Expand Down
2 changes: 2 additions & 0 deletions pack/stgz.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ func (rw *RespondWriter) AddTarget(relname string) error {
if rw.fd == nil {
return nil
}
relname = filepath.ToSlash(relname)
fmt.Fprintf(rw.fd, "echo -e \"install target \\x1b[32m$TOPLEVEL/%s\\x1b[0m\"\nbali_apply_target \"$TOPLEVEL/%s\"\n", relname, relname)
return nil
}
Expand All @@ -208,6 +209,7 @@ func (rw *RespondWriter) AddProfile(relname string) error {
if rw.fd == nil {
return nil
}
relname = filepath.ToSlash(relname)
fmt.Fprintf(rw.fd, "echo -e \"apply config \\x1b[32m$TOPLEVEL/%s\\x1b[0m\"\nbali_apply_config \"$TOPLEVEL/%s\"\n", relname, relname)
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion pack/zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (zp *ZipPacker) Close() error {
// AddTargetLink create zip symlink
func (zp *ZipPacker) AddTargetLink(nameInArchive, linkName string) error {
var hdr zip.FileHeader
hdr.SetModTime(time.Now())
hdr.Modified = time.Now()
hdr.SetMode(0755 | os.ModeSymlink) // symlink
hdr.Name = filepath.ToSlash(nameInArchive)
writer, err := zp.zw.CreateHeader(&hdr)
Expand Down

0 comments on commit 1ce38ef

Please sign in to comment.