Debian Codegraph @

release.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 set -e
4
5 VERSION="0.4.0"
6
7 rmscip-shell system . . rm. -rf dist
8 mkdirscip-shell system . . mkdir. dist
9
10 for ENV in $( goscip-shell system . . go. tool dist list | grepscip-shell system . . grep. -v 'android' | grepscip-shell system . . grep. -v 'darwin/arm' | grepscip-shell system . . grep. -v 's390x' | grepscip-shell system . . grep. -v 'plan9/arm'); do
11 eval $( echoscip-shell system . . echo. $ENV | trscip-shell system . . tr. '/scip-shell filesystem . . `/`.' ' ' | xargsscip-shell system . . xargs. printf 'export GOOS=%s; export GOARCH=%s\n' )
12
13 GOOS=${GOOS:-linux}
14 GOARCH=${GOARCH:-amd64}
15
16 BIN="pup"
17 if [scip-shell system . . `[`. ${GOOS} == "windows" ]; then
18 BIN="pup.exe"
19 fi
20
21 mkdirscip-shell system . . mkdir. -p dist
22
23 echoscip-shell system . . echo. "Building for GOOS=$GOOS GOARCH=$GOARCH"
24
25 sudoscip-shell system . . sudo. rkt run \
26 --set-env=GOOS=${GOOS} \
27 --set-env=GOARCH=${GOARCH} \
28 --set-env=CGO_ENABLED=0 \
29 --volume pup,kind=host,source=${PWD} \
30 --mount volume=pup,target=/go/src/github.com/ericchiang/pup \
31 --insecure-options=image \
32 docker://golang:1.6.3 \
33 --exec go -- build -v -a \
34 -o /go/src/github.com/ericchiang/pup/dist/${BIN} \
35 github.com/ericchiang/pup
36
37 sudoscip-shell system . . sudo. rkt gc --grace-period=0s
38
39 zip dist/pup_v${VERSION}_${GOOS}_${GOARCH}.zip -j dist/${BIN}
40 rmscip-shell system . . rm. -f dist/${BIN}
41 done
42
43 DARWIN_AMD64=pup_v${VERSION}_darwin_amd64.zip
44 DARWIN_386=pup_v${VERSION}_darwin_386.zip
45
46 catscip-shell system . . cat. << EOF > pup.rb
47 # This file was generated by release.sh
48 require 'formula'
49 class Pup < Formula
50 homepage 'https://github.com/ericchiang/pup'
51 version '0.4.0'
52
53 if Hardware::CPU.is_64_bit?
54 url 'https://github.com/ericchiang/pup/releases/download/v${VERSION}/${DARWIN_AMD64}'
55 sha256 '$( sha256sum dist/${DARWIN_AMD64} | awk '{ print $1 }' | xargs printf )'
56 else
57 url 'https://github.com/ericchiang/pup/releases/download/v${VERSION}/${DARWIN_386}'
58 sha256 '$( sha256sum dist/${DARWIN_386} | awk '{ print $1 }' | xargs printf )'
59 end
60
61 def install
62 bin.install 'pup'
63 end
64 end
65 EOF