This commit is contained in:
commit
434d3f037a
2 changed files with 13 additions and 13 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
VERSION=${DRONE_BUILD_NUMBER}
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -gcflags '-e' -ldflags "-X main.version=$VERSION -s -w" -o db db.go
|
||||
CGO_ENABLED=0 GOOS=linux go build -a -gcflags '-e' -ldflags "-X main.version=$VERSION -s -w" -o srv srv.go
|
||||
CGO_ENABLED=0 GOOS=linux go build -v -a -gcflags '-e' -ldflags "-X main.version=$VERSION -s -w" -o db db.go
|
||||
CGO_ENABLED=0 GOOS=linux go build -v -a -gcflags '-e' -ldflags "-X main.version=$VERSION -s -w" -o srv srv.go
|
||||
|
|
|
|||
22
.drone.yml
22
.drone.yml
|
|
@ -3,22 +3,22 @@ workspace:
|
|||
path: src
|
||||
|
||||
pipeline:
|
||||
test_pr:
|
||||
image: golang:alpine
|
||||
environment:
|
||||
- CGO_ENABLED=0
|
||||
- GOOS=linux
|
||||
commands:
|
||||
- go test -cover db.go
|
||||
- go test -cover srv.go
|
||||
when:
|
||||
event: [ push, pull_request ]
|
||||
#test_pr:
|
||||
# image: golang:alpine
|
||||
# environment:
|
||||
# - CGO_ENABLED=0
|
||||
# - GOOS=linux
|
||||
# commands:
|
||||
# - go test -cover db.go
|
||||
# - go test -cover srv.go
|
||||
# when:
|
||||
# event: [ push, pull_request ]
|
||||
|
||||
build_pr:
|
||||
image: golang:alpine
|
||||
commands: sh .drone.sh
|
||||
when:
|
||||
event: [ push, pull_request ]
|
||||
event: pull_request
|
||||
|
||||
publish_srv:
|
||||
image: plugins/docker
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue