-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (36 loc) · 1.27 KB
/
Makefile
File metadata and controls
46 lines (36 loc) · 1.27 KB
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
# SPEC_REPO format: <host.com>/<owner>/<project>
SPEC_REPO_URL_WITH_AUTH := https://$(SPEC_REPO_USERNAME):$(SPEC_REPO_PASSWORD)@$(SPEC_REPO)
SPEC_REPO_BRANCH_OR_COMMIT := $(if $(SPEC_REPO_BRANCH_OR_COMMIT),$(SPEC_REPO_BRANCH_OR_COMMIT),master)
TMPDIR = $(PWD)/tmp/out
.PHONY: generate test package deploy
generate:
docker run -e LANGUAGES=python \
-e SPEC_REPO_URL=$(SPEC_REPO_URL_WITH_AUTH) \
-e SPEC_REPO_BRANCH_OR_COMMIT=$(SPEC_REPO_BRANCH_OR_COMMIT) \
-e SERVICES="app-registry identity ingest catalog collect provisioner action kvstore search ml forwarders streams" \
-v $(TMPDIR):/opt/generated \
scpcodegen:latest \
generate
scripts/copy_generated_files.sh $(TMPDIR)
rm -rf $(TMPDIR)
pep:
tox -e pep8
update_dependencies:
pip3 freeze > requirements.txt
test: test_integration
test_integration:
tox -e py38
test_specific:
sh ./scripts/test_specific.sh
package:
python setup.py sdist bdist_wheel
prerelease:
sh ./scripts/prerelease.sh
deploy: package
pip install twine
# echo "Uploading to internal pypi ..."
# twine upload -s -u "$(SPLUNK_PYPI_USERNAME)" -p "$(SPLUNK_PYPI_PASSWORD)" --repository-url "$(SPLUNK_PYPI_REPO)" dist/*
ifdef UPLOAD_TO_PYPI
echo "Uploading to public pypi ..."
twine upload -s -u "$(PYPI_USERNAME)" -p "$(PYPI_PASSWORD)" dist/*
endif