File: make-release.sh

package info (click to toggle)
golang-github-rhysd-go-github-selfupdate 1.2.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 348 kB
  • sloc: sh: 21; makefile: 6
file content (26 lines) | stat: -rwxr-xr-x 472 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /bin/bash

set -e

if [ ! -d .git ]; then
    echo 'Run this script from root of repository' 1>&2
    exit 1
fi

executable=selfupdate-example

rm -rf release
gox -verbose ./cmd/$executable
mkdir -p release
mv selfupdate-example_* release/
cd release
for bin in *; do
    if [[ "$bin" == *windows* ]]; then
        command="${executable}.exe"
    else
        command="$executable"
    fi
    mv "$bin" "$command"
    zip "${bin}.zip" "$command"
    rm "$command"
done