Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
add snapcraft.yaml for Linux packages of fluxctl
Browse files Browse the repository at this point in the history
	closes #1377

Signed-off-by: Daniel Holbach <[email protected]>
  • Loading branch information
Daniel Holbach committed May 27, 2019
1 parent a5ff9d9 commit ad58702
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ _testmain.go
.ackrc
.envrc

### Package builds (e.g. snap of fluxctl)
fluxctl_*_*.snap
parts
snap
prime
stage


# Specific to this project
vendor/*
!vendor/manifest
Expand Down
39 changes: 39 additions & 0 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: fluxctl
version-script: |
FLUX_TAG="$(git tag -l | egrep -v '^(chart-|helm-|master-|pre-split)' | sort -n | tail -n1)"
if [ "$SNAPCRAFT_PROJECT_GRADE" = "stable" ]
then
echo $FLUX_TAG
else
GIT_REV="$(git rev-parse --short HEAD)"
echo "$FLUX_TAG+$GIT_REV"
fi
version: git
summary: fluxctl talks to Weave Flux and helps you deploy your code
description: |
fluxctl talks to your Weave Flux instance and exposes all its
functionality to an easy to use command line interface.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: classic
base: core18

parts:
fluxctl:
source: .
plugin: go
go-importpath: github.com/weaveworks/flux
override-pull: |
snapcraftctl pull
export GOPATH=$(dirname $SNAPCRAFT_PART_INSTALL)/go
export PATH=$GOPATH/bin:$PATH
cd $GOPATH/src/github.com/weaveworks/flux
dep ensure
build-packages:
- gcc
- go-dep
prime:
- bin/fluxctl

apps:
fluxctl:
command: bin/fluxctl

0 comments on commit ad58702

Please sign in to comment.