build 847 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. [% c("var/set_default_env") -%]
  3. [% pc('go', 'var/setup', { go_tarfile => c('input_files_by_name/go') }) %]
  4. distdir=/var/tmp/dist/[% project %]
  5. mkdir -p $distdir
  6. tar -C /var/tmp/dist -xf [% c('input_files_by_name/gogb') %]
  7. mkdir -p /var/tmp/build
  8. tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
  9. cd /var/tmp/build/[% project %]-[% c('version') %]
  10. # we don't have access to the git repository during the build
  11. sed -i Makefile -e 's|git rev-parse --short HEAD > data/revision|echo [% c("abbrev") %] > data/revision|'
  12. # Unset GOOS and GOARCH as they change some file names, and we don't need
  13. # them as we are only building on x86_64
  14. unset GOOS
  15. unset GOARCH
  16. make
  17. cp bin/sandboxed-tor-browser $distdir
  18. cd $distdir/..
  19. [% c('zip', {
  20. zip_src => [ project ],
  21. zip_args => dest_dir _ '/' _ c('filename'),
  22. }) %]