forked from odise/go-cron
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganitzation and updated to robfig/cron v3
- Loading branch information
1 parent
6f160c2
commit c6de7a1
Showing
12 changed files
with
43 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh -e | ||
|
||
cd $(dirname $0) | ||
|
||
exec docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp golang ./build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh -e | ||
|
||
TARGETS="linux-amd64 linux-arm64 linux-arm linux-386 darwin-amd64 windows-amd64" | ||
STATIC_TARGETS="linux-amd64 linux-arm64 linux-arm linux-386" | ||
BUILD=`git rev-parse --short HEAD` | ||
VERSION=`git describe --tags` | ||
MAIN_GO="main.go" | ||
DEPS="github.com/robfig/cron" | ||
|
||
cd $(dirname $0) | ||
mkdir -p dist | ||
|
||
for TARGET in $TARGETS; do | ||
GOOS=${TARGET%-*} GOARCH=${TARGET#*-} go build -o dist/go-cron-$TARGET -ldflags "-X main.build=$BUILD -X main.version=$VERSION" "$MAIN_GO" | ||
done | ||
for TARGET in $STATIC_TARGETS; do | ||
CGO_ENABLED=0 GOOS=${TARGET%-*} GOARCH=${TARGET#*-} go build -o dist/go-cron-$TARGET-static -ldflags "-X main.build=$BUILD -X main.version=$VERSION"' -extldflags "-static"' "$MAIN_GO" | ||
done | ||
gzip -v -k -9 dist/go-cron-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module github.com/prodrigestivill/go-cron | ||
|
||
go 1.12 | ||
|
||
require github.com/robfig/cron/v3 v3.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= | ||
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package gocron | ||
|
||
import ( | ||
"github.com/robfig/cron" | ||
"github.com/robfig/cron/v3" | ||
"io" | ||
"log" | ||
"os" | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
go run ./main.go "* * * * * *" /bin/bash -c "echo 1;" |