Compare commits

...

2 Commits

Author SHA1 Message Date
Martin Thielecke 04f5375bc4
prepare release v0.0.3 5 months ago
Martin Thielecke 6aceda81c4
create dist 5 months ago
  1. 31
      .drone.yml
  2. 6
      History.md
  3. 30
      create_dist.sh

@ -2,34 +2,11 @@ kind: pipeline
name: default
steps:
- name: create dist
image: alpine:latest
image: golang:latest-alpine
commands:
- mkdir dist
- cp settings.yml.dist dist/settings.yml
when:
event: tag
- name: Go Windows
image: golang:latest
commands:
- GOOS=windows go build -o dist/twitch-data-collector.exe *.go
- cd dist && zip twitch-data-collector-win-${DRONE_TAG}.zip twitch-data-collector.exe settings.yml && rm twitch-data-collector.exe
when:
event: tag
- name: Go Linux AMD64
image: golang:latest
commands:
- GOOS=linux GOARCH=amd64 go build -o dist/twitch-data-collector *.go
- cd dist && zip twitch-data-collector-linux-amd64-${DRONE_TAG}.zip twitch-data-collector settings.yml && twitch-data-collector
when:
event: tag
- name: Go Linux ARM
image: golang:latest
commands:
- GOOS=linux GOARCH=arm go build -o dist/twitch-data-collector *.go
- cd dist && zip twitch-data-collector-linux-arm-${DRONE_TAG}.zip twitch-data-collector settings.yml && twitch-data-collector
- apk update
- apk add zip
- ./create_dist.sh
when:
event: tag

@ -1,7 +1,11 @@
# 0.0.3 / 2022-05-20
* create dist
# 0.0.2 / 2022-05-20
* fix typo
# 0.0.1 / 2022-05-20
* initial release
* initial release

@ -0,0 +1,30 @@
#!/bin/bash
export basename=twitch-data-collector
mkdir dist
cp settings.yml.dist dist/settings.yml
go_build () {
go build -o dist/$basename-$DRONE_TAG-$GOOS-$GOARCH$ext *.go
}
create_zip () {
cd dist
zip $basename-$DRONE_TAG-$GOOS-$GOARCH.zip $basename-$DRONE_TAG-$GOOS-$GOARCH$ext settings.yml
rm $basename-$DRONE_TAG-$GOOS-$GOARCH$ext
cd ..
}
export GOARCH=amd64
export GOOS=windows
export ext=".exe"
go_build
create_zip
export ext=""
export GOOS=linux
go_build
create_zip
rm dist/settings.yml
Loading…
Cancel
Save