-
Notifications
You must be signed in to change notification settings - Fork 3
/
Oyafile
66 lines (55 loc) · 2.04 KB
/
Oyafile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# -*- mode: yaml -*-
Project: project
Require:
github.com/tooploox/oya-packs/innosetup: v0.0.1
github.com/tooploox/oya-fixtures: v1.1.0
Values:
pgpkey: 317D 6971 DD80 4501 A6B8 65B9 0F1F D46E 2E8C 7202
Ignore:
- pkg/*
develop.Doc: Install development prerequisites.
develop: |
go get github.com/cucumber/godog/cmd/godog
install.Doc: Install oya.
install: |
go install .
test.Doc: Run tests.
test: |
set -e
go test -v ./... && \
godog $@
test.Doc: Run installer tests.
testInstaller: |
cd install/test/
./runTests.sh
testKeysImport.Doc: Imports test PGP keys required by sops.
testKeysImport: |
if ! [[ -n $(gpg --fingerprint | grep '${Oya[pgpkey]}') ]]
then
gpg --import testutil/pgp/private.rsa
echo "Oya test PGP Key imported"
fi
testKeysRemove.Doc: Removes test PGP keys.
testKeysRemove: |
if [[ -n $(gpg --fingerprint | grep '${Oya[pgpkey]}') ]]
then
gpg --batch --delete-secret-keys '${Oya[pgpkey]}'
gpg --batch --delete-keys '${Oya[pgpkey]}'
echo "Oya test PGP Key deleted"
fi
release: |
go get -u github.com/mitchellh/gox
go get -u github.com/tcnksm/ghr
gox -os="linux darwin" -arch="amd64 386" -output="dist/oya_${CIRCLE_TAG}_{{.OS}}_{{.Arch}}" -ldflags="-X main.buildVersion=${CIRCLE_TAG}"
# Windows compilation is seperated because it failes when bulding two arch parallel.
gox -os="windows" -arch="amd64" -output="dist/oya_${CIRCLE_TAG}_{{.OS}}_{{.Arch}}" -ldflags="-X main.buildVersion=${CIRCLE_TAG}"
gox -os="windows" -arch="386" -output="dist/oya_${CIRCLE_TAG}_{{.OS}}_{{.Arch}}" -ldflags="-X main.buildVersion=${CIRCLE_TAG}"
find ./dist -type f ! -name "*.exe" -exec gzip {} \;
find ./dist -type f -name "*.exe" -execdir zip {}.zip {} \;
find ./dist -type f -name "*.exe" -exec rm {} \;
sha256sum dist/oya_${CIRCLE_TAG}_{darwin,linux,windows}_* | tee dist/oya_${CIRCLE_TAG}_SHA256SUMS
if [ "$CIRCLE_TAG" ]; then
ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME --replace $CIRCLE_TAG dist/
else
echo "The build is missing Git / CircleCi Tag"
fi