Compare commits

..

No commits in common. "04f5375bc4ec9ae05697ced0d3e5691dadedf0f0" and "dc460824a29d441e627a050051ae85b18744ab00" have entirely different histories.

3 changed files with 28 additions and 39 deletions

View File

@ -2,11 +2,34 @@ kind: pipeline
name: default
steps:
- name: create dist
image: golang:latest-alpine
image: alpine:latest
commands:
- apk update
- apk add zip
- ./create_dist.sh
- 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
when:
event: tag

View File

@ -1,11 +1,7 @@
# 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

View File

@ -1,30 +0,0 @@
#!/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