Skip to content

Commit 4a55293

Browse files
committed
Added windows in releases
Signed-off-by: Vishal Rana <vr@labstack.com>
1 parent 1a6125a commit 4a55293

File tree

6 files changed

+33
-9
lines changed

6 files changed

+33
-9
lines changed

.goreleaser.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ before:
33
hooks:
44
- go mod download
55
builds:
6-
-
7-
main: cmd/tunnel/main.go
6+
- main: cmd/tunnel/main.go
7+
goos:
8+
- darwin
9+
- linux
10+
- windows
811
goarch:
912
- 386
1013
- amd64
@@ -18,6 +21,9 @@ archives:
1821
darwin: macos
1922
amd64: 64-bit
2023
386: 32-bit
24+
format_overrides:
25+
- goos: windows
26+
format: zip
2127
nfpm:
2228
formats:
2329
- deb

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
IMAGE = labstack/tunnel
2-
VERSION = 0.3.1
2+
VERSION = 0.3.2
33

44
publish:
55
git tag v$(VERSION)

cmd/daemon.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"os"
99
"os/exec"
1010
"strconv"
11-
"syscall"
1211
"time"
1312

1413
"github.com/spf13/cobra"
@@ -30,10 +29,7 @@ func startDaemon() {
3029
log.Fatal(err)
3130
}
3231
c := exec.Command(e, "daemon")
33-
c.SysProcAttr = &syscall.SysProcAttr{
34-
Setpgid: true,
35-
Pgid: 0,
36-
}
32+
c.SysProcAttr = sysProcAttr
3733
f, err := os.OpenFile(viper.GetString("log_file"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
3834
if err != nil {
3935
log.Fatal(err)

cmd/daemon_unix.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// +build darwin linux
2+
3+
package cmd
4+
5+
import "syscall"
6+
7+
var (
8+
sysProcAttr = &syscall.SysProcAttr{
9+
Setpgid: true,
10+
Pgid: 0,
11+
}
12+
)

cmd/daemon_windows.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// +build windows
2+
package cmd
3+
4+
import "syscall"
5+
6+
var (
7+
sysProcAttr = &syscall.SysProcAttr{
8+
CreationFlags: syscall.CREATE_NEW_PROCESS_GROUP,
9+
}
10+
)

cmd/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
const (
25-
version = "v0.3.1"
25+
version = "v0.3.2"
2626
)
2727

2828
var versionCmd = &cobra.Command{

0 commit comments

Comments
 (0)