This repository has been archived on 2023-09-29. You can view files and clone it, but cannot push or open issues or pull requests.
twitch_data_collector/create_dist.sh
2022-05-20 19:00:54 +02:00

31 lines
514 B
Bash
Executable File

#!/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