This commit is contained in:
parent
0ad79ebd49
commit
b38ba11b6b
10
.drone.yml
10
.drone.yml
@ -3,8 +3,12 @@ workspace:
|
||||
path: src/gitbase.de/apairon/mark2web
|
||||
|
||||
pipeline:
|
||||
build_mark2web:
|
||||
build_mark2web_linux:
|
||||
image: golang:latest
|
||||
environment:
|
||||
- CGO_ENABLED=0
|
||||
- GOOS=linux
|
||||
- GOARCH=amd64
|
||||
commands:
|
||||
- ./build.sh
|
||||
|
||||
@ -12,8 +16,8 @@ pipeline:
|
||||
image: alpine
|
||||
commands:
|
||||
- ls -la
|
||||
- ./mark2web -version
|
||||
- ./mark2web -in website -out html -create -logLevel debug
|
||||
- ./dist/mark2web-linux-amd64 -version
|
||||
- ./dist/mark2web-linux-amd64 -in website -out html -create -logLevel debug
|
||||
|
||||
build_docker:
|
||||
image: docker
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM alpine
|
||||
RUN apk update && apk add openssh-client sshpass rsync && rm -r /var/cache/
|
||||
ADD mark2web /
|
||||
ADD dist/mark2web-linux-amd64 /mark2web
|
||||
CMD ["/mark2web"]
|
||||
|
3
build.sh
3
build.sh
@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
CGO_ENABLED=0 go build -v -ldflags "-X main.Version=`git describe --tags --long` -X main.GitHash=`git rev-parse HEAD` -X main.BuildTime=`date -u '+%Y-%m-%d_%I:%M:%S%p'`"
|
||||
mkdir -p dist
|
||||
go build -v -ldflags "-X main.Version=`cat VERSION` -X main.GitHash=`git rev-parse HEAD` -X main.BuildTime=`date -u '+%Y-%m-%d_%I:%M:%S%p'`" -o dist/mark2web-${GOOS}-${GOARCH}${ext}
|
||||
|
Loading…
Reference in New Issue
Block a user