forked from krysopath/vaultify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
78 lines (66 loc) · 1.56 KB
/
Makefile
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
67
68
69
70
71
72
73
74
75
76
77
78
TARGET ?= prod
BASE_IMAGE := 3.7-alpine3.9
HEAD ?= $(shell git rev-parse --short HEAD)
TAG ?= $(shell git describe --abbrev=0 --tags)
ci: run/tests\
artifact/pkg\
artifact/docker\
artifact/tag
dev/ci:
ls vaultify/*py Dockerfile .vaultify.yml | entr -s 'make run/tests'
artifact/pkg: clean
python3 setup.py sdist bdist_wheel
pypi: artifact/pkg
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
artifact/docker:
docker build \
--build-arg BASE_IMAGE=$(BASE_IMAGE)\
-t vaultify:$(HEAD)\
--target $(TARGET)\
.
docker tag\
vaultify:$(HEAD)\
vaultify:$(TAG)-py$(BASE_IMAGE)
artifact/tag:
docker tag\
vaultify:$(HEAD)\
vaultify:$(TAG)
clean:
rm -rf tests/new* assets/* build/ dist *vaultify.egg*
run/tests: clean
cp tests/test-config.env assets/secrets.plain
gpg \
--symmetric\
--batch\
--passphrase=abc\
-o assets/test.gpg\
tests/secrets.env
openssl enc\
-k abc\
-md sha256\
-aes-256-cbc\
-salt\
-a\
-in tests/secrets.env\
-out assets/test.enc
VAULTIFY_LOG_LEVEL=DEBUG python3 runtests.py
manual:
@groff -man -Tascii man/vaultify.1
dev/install/tools:
python3\
-m pip\
install\
--user\
--upgrade\
pip setuptools wheel twine black
dev/install/os:
sudo apt-get install gnupg openssl
.ONESHELL:
dev/git-init:
@read -p "enter email: " EMAIL
read -p "enter public signature-key: " GPG
git config user.signingKey $${GPG}
git config user.email $${EMAIL}
git config commit.gpgSign true
git config tag.gpgSign true
git config core.hooksPath .githooks