Skip to content

Commit 47345ed

Browse files
committed
Fixed release target on Makefile.
1 parent 04f4c35 commit 47345ed

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

Makefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,43 @@
11
VERSION=master
22

3-
all: build/GXWriter-$(VERSION).curapackage build/FlashforgeFinderIntegration-$(VERSION).curapackage
3+
all: build
44

55
clean:
66
rm -rf build
77

8+
build: build-gxwriter build-ffintegration
9+
10+
build-gxwriter: build/GXWriter-$(VERSION).curapackage
811
build/GXWriter-$(VERSION).curapackage: plugins/GXWriter/* LICENSE icon.png
912
mkdir -p build/GXWriter/files/plugins
1013
cp LICENSE icon.png build/GXWriter
1114
cp -r plugins/GXWriter/ build/GXWriter/files/plugins/
1215
mv build/GXWriter/files/plugins/GXWriter/package.json build/GXWriter/
16+
sed -i -e 's/"version":.*/"version": "$(VERSION)"/g' build/GXWriter/files/plugins/GXWriter/plugin.json
17+
sed -i -e 's/"package_version":.*/"package_version": "$(VERSION)"/g' build/GXWriter/package.json
1318
cd build/GXWriter && \
1419
zip ../GXWriter-$(VERSION).curapackage -q \
1520
-x "*testdata*" \
1621
-x "*__pycache__*" \
1722
-x "*pyc" \
1823
-r .
1924

25+
build-ffintegration: build/FlashforgeFinderIntegration-$(VERSION).curapackage
2026
build/FlashforgeFinderIntegration-$(VERSION).curapackage: plugins/FlashforgeFinderIntegration/* LICENSE icon.png
2127
mkdir -p build/FlashforgeFinderIntegration/files/plugins
2228
cp LICENSE icon.png build/FlashforgeFinderIntegration
2329
cp -r plugins/FlashforgeFinderIntegration/ build/FlashforgeFinderIntegration/files/plugins/
2430
mv build/FlashforgeFinderIntegration/files/plugins/FlashforgeFinderIntegration/package.json build/FlashforgeFinderIntegration/
31+
sed -i -e 's/"version":.*/"version": "$(VERSION)"/g' build/FlashforgeFinderIntegration/files/plugins/FlashforgeFinderIntegration/plugin.json
32+
sed -i -e 's/"package_version":.*/"package_version": "$(VERSION)"/g' build/FlashforgeFinderIntegration/package.json
2533
cd build/FlashforgeFinderIntegration && \
2634
zip ../FlashforgeFinderIntegration-$(VERSION).curapackage -q \
2735
-x "*testdata*" \
2836
-x "*__pycache__*" \
2937
-x "*pyc" \
3038
-r .
39+
40+
release: build/GXWriter-$(VERSION).curapackage build/FlashforgeFinderIntegration-$(VERSION).curapackage
41+
if [ x"$(VERSION)" = x"master" ] ; then echo "Unable to release from master. Use make VERSION=X.Y.Z" ; exit 1; fi
42+
git tag v$(VERSION)
43+
git push --tags

0 commit comments

Comments
 (0)