Add explicit target for uploading to CF

This commit is contained in:
Dave Smith committed 2019-03-14 14:57:03 -06:00
1 parent 227e581bb9
commit 2834ec00a7
2 files changed
+23 -5

No files matched your search

+19 -2
View File
@@ -8,13 +8,30 @@ dev:
clean:
rm -rf build .gradle .idea run out *.iml *.ipr *.iws
rel:
rel.upload:
docker build -t mekanica .
docker run -a stdin -a stdout -a stderr -e CF_API_TOKEN -w /mekanica -it mekanica make docker.rel
docker run -a stdin -a stdout -a stderr -e CF_API_TOKEN \
-w /mekanica -it mekanica make docker.rel.upload
docker.rel.upload:
python3 release.py \
-project=315844:mekanica: \
-project=315908:mekanica-generators:mekanica \
-project=315907:mekanica-tools:mekanica \
-mcvsn 1.12.2 -rel release
rel:
mkdir -p build.docker
docker build -t mekanica .
docker run -a stdin -a stdout -a stderr -e CF_API_TOKEN \
--mount type=bind,src=`pwd`/build.docker,dst=/build.docker \
-w /mekanica -it mekanica make docker.rel
docker.rel:
python3 release.py \
-project=315844:mekanica: \
-project=315908:mekanica-generators:mekanica \
-project=315907:mekanica-tools:mekanica \
-skipupload=true \
-mcvsn 1.12.2 -rel release
cp build/libs/* /build.docker
+4 -3
View File
@@ -100,6 +100,9 @@ if err != None:
print("Build of %s tag failed" % (args.tag))
sys.exit(1)
# Print changelog
print(changelog)
# For each project, extract ID, filename and dependencies and upload
for project in args.project:
(id, name, dep) = project.split(":", 3)
@@ -113,9 +116,7 @@ for project in args.project:
metadata["relations"] = {"projects": [{"slug": dep, "type": "requiredDependency"}]}
if args.skipupload:
print("Skipping upload!")
print("Metadata: %s" % metadata)
print("Filename: %s" % filename)
print("Skipping upload of %s" % filename)
continue
# Setup files for POST