Add winsvcwrap project
parent
059bb77096
commit
fa019cf1a5
@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
[% c("var/set_default_env") -%]
|
||||||
|
[% pc('go', 'var/setup', { go_tarfile => c('input_files_by_name/go') }) %]
|
||||||
|
export CGO_ENABLED=0
|
||||||
|
distdir=/var/tmp/dist/[% project %]
|
||||||
|
mkdir -p $distdir
|
||||||
|
|
||||||
|
[% FOREACH dep = c("var/go_lib_deps") -%]
|
||||||
|
tar -C /var/tmp/dist -xf [% c('input_files_by_name/' _ dep) %]
|
||||||
|
[% END -%]
|
||||||
|
|
||||||
|
mkdir -p $GOPATH/src/github.com/hlandau
|
||||||
|
tar -C $GOPATH/src/github.com/hlandau -xf [% project %]-[% c('version') %].tar.gz
|
||||||
|
mv $GOPATH/src/github.com/hlandau/winsvcwrap-[% c('version') %] $GOPATH/src/github.com/hlandau/winsvcwrap
|
||||||
|
|
||||||
|
[% FOREACH inst IN c("var/go_lib_install") %]
|
||||||
|
# TODO: Remove static build ID after migrating to Go 1.13.3+
|
||||||
|
go install -ldflags '-s -buildid=' [% inst %]
|
||||||
|
[% END %]
|
||||||
|
|
||||||
|
[% IF c("var/linux-x86_64") -%]
|
||||||
|
GOPATHBIN="${GOPATH}/bin"
|
||||||
|
[% ELSE -%]
|
||||||
|
GOPATHBIN="${GOPATH}/bin/${GOOS}_${GOARCH}"
|
||||||
|
[% END -%]
|
||||||
|
|
||||||
|
ls $GOPATHBIN
|
||||||
|
|
||||||
|
for x in winsvcwrap; do
|
||||||
|
cp -a $GOPATHBIN/"$x"[% IF c("var/windows") %].exe[% END %] $distdir/
|
||||||
|
done
|
||||||
|
|
||||||
|
cd $distdir
|
||||||
|
[% c('tar', {
|
||||||
|
tar_src => [ '.' ],
|
||||||
|
tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
|
||||||
|
}) %]
|
@ -0,0 +1,26 @@
|
|||||||
|
version: '[% c("abbrev") %]'
|
||||||
|
git_url: https://github.com/hlandau/winsvcwrap.git
|
||||||
|
git_hash: 'c0800f931ae97f9662297b22f8c069a488209d05'
|
||||||
|
filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
|
||||||
|
|
||||||
|
var:
|
||||||
|
container:
|
||||||
|
use_container: 1
|
||||||
|
go_lib_deps:
|
||||||
|
- godexlogconfig
|
||||||
|
- goservice
|
||||||
|
go_lib_install:
|
||||||
|
- github.com/hlandau/winsvcwrap
|
||||||
|
cgo: 0
|
||||||
|
build_go_lib_pre: |
|
||||||
|
export CGO_ENABLED=[% c("var/cgo") %]
|
||||||
|
|
||||||
|
input_files:
|
||||||
|
- project: container-image
|
||||||
|
- name: go
|
||||||
|
project: go
|
||||||
|
- name: godexlogconfig
|
||||||
|
project: godexlogconfig
|
||||||
|
- name: goservice
|
||||||
|
project: goservice
|
||||||
|
|
Loading…
Reference in New Issue