File tree 5 files changed +67
-4
lines changed
5 files changed +67
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : build and test
2
+ on : [push]
3
+ jobs :
4
+ just_test :
5
+ if : startsWith(github.ref, 'refs/heads/main')
6
+ runs-on : ubuntu-latest
7
+ steps :
8
+ - uses : actions/checkout@v2
9
+ - uses : actions/setup-go@v2
10
+ with :
11
+ go-version : ' ^1.13.1'
12
+ - name : go test
13
+ run : go test -v ./...
14
+ test_build_release :
15
+ if : startsWith(github.ref, 'refs/tags/')
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - uses : actions/checkout@v2
19
+ - uses : actions/setup-go@v2
20
+ with :
21
+ go-version : ' ^1.13.1'
22
+ - name : Get the version
23
+ id : get_tag
24
+ run : echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
25
+ - name : go test
26
+ run : go test -v ./...
27
+ - name : build
28
+ shell : bash
29
+ run : |
30
+ # Make an artifacts directory
31
+ mkdir -p artifacts
32
+
33
+ # run the build for each supported OS
34
+ for os in "linux" "darwin" "windows"; do
35
+ echo "Building for $os..."
36
+ GOOS=$os CGO_ENABLED=0 go build -a -ldflags="-X main.version=${{ steps.get_tag.outputs.SOURCE_TAG }}" -o ./artifacts/launch_${os} .
37
+
38
+ # If its windows we need to rename it to have .exe at the end.
39
+ if [ $os == "windows" ]; then
40
+ mv ./artifacts/launch_$os ./artifacts/launch_$os.exe
41
+ fi
42
+ done
43
+ # Make an Arm bin for linux also
44
+ for arch in arm64 arm; do
45
+ echo "Building for linux on $arch..."
46
+ GOOS=linux GOARCH=$arch CGO_ENABLED=0 go build -a -ldflags="-X main.version=${{ steps.get_tag.outputs.SOURCE_TAG }}" -o ./artifacts/launch_linux_${arch} .
47
+ done
48
+
49
+ - name : Release
50
+ uses : softprops/action-gh-release@v1
51
+ with :
52
+ files : artifacts/*
53
+ body_path : .github/workflows/release_body.md
54
+ env :
55
+ GITHUB_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change
1
+ # Bug fix and Github work flows
2
+
3
+ Fixed a bug where processes set to have a start delay did not delay.
4
+ Adding in Github work flow.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ {
2
+ "cSpell.words" : [
3
+ " pmlogger"
4
+ ]
5
+ }
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ func (p *Process) running() bool {
41
41
42
42
func (p * Process ) processStartDelay () {
43
43
if p .config .StartDelay != 0 {
44
- p .pmlogger .Debugf ("Process start is configured for delayed start of %d seconds.\n " , p .config .StartDelay )
44
+ p .pmlogger .Printf ("Process start is configured for delayed start of %d seconds.\n " , p .config .StartDelay )
45
45
time .Sleep (time .Second * time .Duration (p .config .StartDelay ))
46
46
}
47
47
}
@@ -55,6 +55,8 @@ func (p *Process) runProcess(processType string) *processEnd {
55
55
ExitCode : - 1 ,
56
56
}
57
57
58
+ p .processStartDelay ()
59
+
58
60
if err := p .proc .Start (); err != nil {
59
61
p .exitcode = 1
60
62
finalState .Error = err
You can’t perform that action at this time.
0 commit comments