Adding two build for Linux, MacOS X and Windows.
This commit is contained in:
parent
ac52da6ef3
commit
c9ae5b1ca8
|
@ -1,9 +1,21 @@
|
|||
image: "golang:1-alpine"
|
||||
|
||||
build:
|
||||
before_script:
|
||||
# Disabling cgo to not install gcc
|
||||
- export CGO_ENABLED=0
|
||||
|
||||
build_linux_amd64:
|
||||
script:
|
||||
- CGO_ENABLED=0 go build .
|
||||
- GOOS=linux GOARCH=amd64 go build -o ./magnetico-go-migrator-$GOOS-$GOARCH .
|
||||
- ./magnetico-go-migrator --help
|
||||
artifacts:
|
||||
paths:
|
||||
- magnetico-go-migrator
|
||||
|
||||
build_windows_amd64:
|
||||
script:
|
||||
- GOOS=windows GOARCH=amd64 go build -o ./magnetico-go-migrator-$GOOS-$GOARCH .
|
||||
|
||||
build_darwin_amd64:
|
||||
script:
|
||||
- GOOS=darwin GOARCH=amd64 go build -o ./magnetico-go-migrator-$GOOS-$GOARCH .
|
||||
|
|
Reference in a new issue