build 1012 B

12345678910111213141516171819202122232425262728293031
  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. [% c("var/set_PTDIR_DOCSDIR") -%]
  6. mkdir -p $PTDIR $DOCSDIR
  7. tar -C /var/tmp/dist -xf [% c('input_files_by_name/uniuri') %]
  8. tar -C /var/tmp/dist -xf [% c('input_files_by_name/goptlib') %]
  9. tar -C /var/tmp/dist -xf [% c('input_files_by_name/pion-webrtc') %]
  10. mkdir -p /var/tmp/build
  11. tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
  12. cd /var/tmp/build/[% project %]-[% c('version') %]
  13. mkdir -p "$GOPATH/src/git.torproject.org/pluggable-transports"
  14. ln -sf "$PWD" "$GOPATH/src/git.torproject.org/pluggable-transports/snowflake.git"
  15. cd client
  16. go build -ldflags '-s'
  17. cp -a client[% IF c("var/windows") %].exe[% END %] $PTDIR/snowflake-client[% IF c("var/windows") %].exe[% END %]
  18. cd ..
  19. cp -a README.md LICENSE $DOCSDIR
  20. cd $distdir
  21. [% c('tar', {
  22. tar_src => [ '.' ],
  23. tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
  24. }) %]