build 847 Bytes
Newer Older
boklm's avatar
boklm committed
1
#!/bin/bash
2
[% c("var/set_default_env") -%]
boklm's avatar
boklm committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[% pc('go', 'var/setup', { go_tarfile => c('input_files_by_name/go') }) %]
distdir=/var/tmp/dist/[% project %]
mkdir -p $distdir

tar -C /var/tmp/dist -xf [% c('input_files_by_name/gogb') %]

mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
cd /var/tmp/build/[% project %]-[% c('version') %]

# we don't have access to the git repository during the build
sed -i Makefile -e 's|git rev-parse --short HEAD > data/revision|echo [% c("abbrev") %] > data/revision|' 
# Unset GOOS and GOARCH as they change some file names, and we don't need
# them as we are only building on x86_64
unset GOOS
unset GOARCH
make
cp bin/sandboxed-tor-browser $distdir

cd $distdir/..
[% c('zip', {
      zip_src => [ project ],
      zip_args => dest_dir _ '/' _ c('filename'),
  }) %]