update cgofuse dependency to v1.0.1
This commit is contained in:
committed by
Nick Craig-Wood
parent
7ee3cfd7c9
commit
95c0378e3c
+69
@@ -0,0 +1,69 @@
|
||||
version: 2
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
machine: true
|
||||
|
||||
environment:
|
||||
PROJNAME: github.com/billziss-gh/cgofuse
|
||||
|
||||
working_directory: ~/.go_workspace/src/github.com/billziss-gh/cgofuse
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
- run:
|
||||
name: Build cgofuse image
|
||||
command: docker build -t cgofuse .
|
||||
|
||||
- run:
|
||||
name: Cross-compile cgofuse
|
||||
command: |
|
||||
go get -v github.com/karalabe/xgo
|
||||
xgo \
|
||||
--image=cgofuse \
|
||||
--targets=darwin/386,darwin/amd64,linux/386,linux/amd64,windows/386,windows/amd64 \
|
||||
--buildmode=archive \
|
||||
./fuse
|
||||
|
||||
- run:
|
||||
name: Prepare artifacts
|
||||
command: |
|
||||
mkdir -p /tmp/cgofuse.work/src/$PROJNAME/fuse
|
||||
echo //go:binary-only-package >/tmp/cgofuse.work/src/$PROJNAME/fuse/host.go
|
||||
echo package fuse >>/tmp/cgofuse.work/src/$PROJNAME/fuse/host.go
|
||||
echo //go:binary-only-package >/tmp/cgofuse.work/src/$PROJNAME/fuse/fsop.go
|
||||
echo package fuse >>/tmp/cgofuse.work/src/$PROJNAME/fuse/fsop.go
|
||||
for f in fuse-*.[al]*; do
|
||||
d=$(echo "$f" | sed 's/fuse-\([^-.]*\).*-\([^-.]*\)\..*/\1_\2/g')
|
||||
mkdir -p /tmp/cgofuse.work/pkg/$d/$PROJNAME
|
||||
cp "$f" /tmp/cgofuse.work/pkg/$d/$PROJNAME/fuse.a
|
||||
done
|
||||
mkdir -p /tmp/cgofuse.dist
|
||||
GIT_DSC=$(git describe --long)
|
||||
(cd /tmp/cgofuse.work && zip -rv - *) >/tmp/cgofuse.dist/cgofuse-$GIT_DSC.zip
|
||||
|
||||
- store_artifacts:
|
||||
path: /tmp/cgofuse.dist
|
||||
|
||||
- deploy:
|
||||
name: Make github release
|
||||
command: |
|
||||
if git describe --exact-match >/dev/null 2>&1; then
|
||||
GIT_TAG=$(git describe --exact-match)
|
||||
GIT_DSC=$(git describe --long)
|
||||
go get -v github.com/aktau/github-release
|
||||
github-release release \
|
||||
--user "$CIRCLE_PROJECT_USERNAME" \
|
||||
--repo "$CIRCLE_PROJECT_REPONAME" \
|
||||
--tag $GIT_TAG \
|
||||
--pre-release || true
|
||||
github-release upload \
|
||||
--user "$CIRCLE_PROJECT_USERNAME" \
|
||||
--repo "$CIRCLE_PROJECT_REPONAME" \
|
||||
--tag $GIT_TAG \
|
||||
--file /tmp/cgofuse.dist/cgofuse-$GIT_DSC.zip \
|
||||
--name cgofuse-${GIT_TAG:1}.zip \
|
||||
--replace
|
||||
fi
|
||||
Reference in New Issue
Block a user