mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-16 15:10:12 +01:00
28 lines
No EOL
567 B
Bash
28 lines
No EOL
567 B
Bash
#!/bin/bash -e
|
|
|
|
if [ -z "$1" ]
|
|
then
|
|
echo "No argument supplied, please either supply 'release' for a release build or 'ci' for ci build."
|
|
exit 1
|
|
fi
|
|
|
|
source /build_environment.sh
|
|
|
|
# Grab the last segment from the package name
|
|
name=${pkgName##*/}
|
|
|
|
echo "Running Tests $pkgName..."
|
|
(
|
|
go test -v $(glide novendor) || exit 1
|
|
)
|
|
|
|
if [ "$1" == "release" ]
|
|
then
|
|
echo "Release Building $pkgName..."
|
|
CGO_ENABLED=${CGO_ENABLED:-0} \
|
|
goreleaser
|
|
else
|
|
echo "Snapshot Building $pkgName..."
|
|
CGO_ENABLED=${CGO_ENABLED:-0} \
|
|
goreleaser --snapshot --skip-publish
|
|
fi |