-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (17 loc) · 718 Bytes
/
Copy pathMakefile
File metadata and controls
24 lines (17 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
.PHONY: build clean
NAME := "app"
VERSION := $(shell python3 setup.py -V)
RPMDIR := "$(shell pwd)/rpms"
default: build
build:
python3 setup.py sdist
clean:
rm -rf build dist *.egg-info rpms
rpm: build
rm -rf rpms/*
mock -r epel-7-x86_64 -D "pyversion ${VERSION}" --buildsrpm --spec ${NAME}.spec --sources dist --resultdir rpms
mock -r epel-7-x86_64 -D "pyversion ${VERSION}" --rebuild rpms/${NAME}-*.src.rpm --resultdir rpms
upload: RPM := $(shell basename ${RPMDIR}/${NAME}-${VERSION}-*.x86_64.rpm)
upload:
@echo Uploading $(RPM)
ssh repomanager@jenkins.dmz.ii.inmanta.com "/usr/bin/repomanager --config /etc/repomanager.toml --repo training --distro el7 --file - --file-name ${RPM}" < ${RPMDIR}/${RPM}