Skip to content

Commit e9ca886

Browse files
committed
Fix makefile
Former-commit-id: 71a2bc5 [formerly a9e2e11] Former-commit-id: 71a2bc5 Former-commit-id: d0405ee
1 parent 8e3a28e commit e9ca886

1 file changed

Lines changed: 10 additions & 44 deletions

File tree

makefile

Lines changed: 10 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,14 @@ PNG_FILES := $(shell find ./graphics -iname '*.png' -type f)
1616

1717
OUT_FILES := $(SED_FILES:%=$(OUTPUT_DIR)/%)
1818

19-
SED_EXPRS := -e 's/{{MOD_NAME}}/$(PACKAGE_NAME)/g'
20-
SED_EXPRS += -e 's/{{VERSION}}/$(VERSION_STRING)/g'
21-
22-
##@luac -p $@
23-
##@luacheck $@
19+
SED_EXPRS := -e 's/{{_MOD_NAME_}}/$(PACKAGE_NAME)/g'
20+
SED_EXPRS += -e 's/{{_MOD_VERSION_}}/$(VERSION_STRING)/g'
2421

2522
all: clean
2623

2724
release: clean check package
2825

29-
optimized-release: clean check optimize-package
30-
31-
git: tag
32-
git checkout master
33-
git merge develop master
34-
git checkout develop
35-
git push --all
36-
git push --tags
37-
38-
github-release:
39-
curl --data '{"tag_name": "v$(VERSION_STRING)","target_commitish": "master","name": "v$(VERSION_STRING)","body": "Release of version $(VERSION_STRING)","draft": false,"prerelease": false}' https://api.github.com/repos/pyanodon/pYCoalprocesing/releases?access_token=$(TOKEN);
40-
#curl 'https://api.github.com/repos/pyanodon/pYCoalprocesing/releases/v$(VERSION_STRING)/assets?access_token=$(TOKEN)&name=$(OUTPUT_NAME).zip' --header 'Content-Type: application/zip' --upload-file $(BUILD_DIR)/$(OUTPUT_NAME).zip -X POST;
26+
optimized-release: clean check tag optimize-package
4127

4228
package-copy: $(PKG_DIRS) $(PKG_FILES)
4329
@mkdir -p $(OUTPUT_DIR)
@@ -49,38 +35,20 @@ $(OUTPUT_DIR)/%.lua: %.lua
4935
@mkdir -p $(@D)
5036
@sed $(SED_EXPRS) $< > $@
5137

52-
5338
$(OUTPUT_DIR)/%: %
5439
@mkdir -p $(@D)
5540
@sed $(SED_EXPRS) $< > $@
5641

57-
link2:
58-
([ -d "$(MODS_DIRECTORY)/$(OUTPUT_NAME)" ] && \
59-
echo "Junction does not need updating.") || \
60-
@[ -d "$(MODS_DIRECTORY)/$(PACKAGE_NAME)*" ] && \
61-
echo "Updating Junction" && \
62-
mv $(MODS_DIRCTORY)/$(PACKAGE_NAME)* $(MODS_DIRECTORY)/$(OUTPUT_NAME)
63-
64-
link:
65-
if test -d $(MODS_DIRECTORY)/$(PACKAGE_NAME)*; then \
66-
if test -d $(MODS_DIRECTORY)/$(OUTPUT_NAME); then \
67-
echo "Dont Update"; \
68-
else \
69-
echo "DO STUFF"; \
70-
fi \
71-
else \
72-
echo "No Target to Link"; \
73-
fi
42+
update-stdlib:
43+
#copy stdlib-files from branch
44+
git add stdlib/
45+
git commit -m "STDLIB Update"
7446

7547
tag:
7648
git tag -f v$(VERSION_STRING)
49+
git push --tags -f
7750

78-
optimize1:
79-
for name in $(PNG_FILES); do \
80-
optipng -o8 $(OUTPUT_DIR)'/'$$name; \
81-
done
82-
83-
optimize2:
51+
optimize:
8452
@echo Please wait, Optimizing Graphics.
8553
@for name in $(PNG_FILES); do \
8654
pngquant --skip-if-larger -q --strip --ext .png --force $(OUTPUT_DIR)'/'$$name; \
@@ -98,12 +66,10 @@ check:
9866
@luacheck . -q --codes
9967

10068
package: package-copy $(OUT_FILES) nodebug
101-
@cp -r stdlib $(BUILD_DIR)/$(OUTPUT_NAME)/stdlib
10269
@cd $(BUILD_DIR) && zip -rq $(OUTPUT_NAME).zip $(OUTPUT_NAME)
10370
@echo $(OUTPUT_NAME).zip ready
10471

105-
optimize-package: package-copy $(OUT_FILES) nodebug optimize2
106-
@cp -r stdlib $(BUILD_DIR)/$(OUTPUT_NAME)/stdlib
72+
optimize-package: package-copy $(OUT_FILES) nodebug optimize tag
10773
@cd $(BUILD_DIR) && zip -rq $(OUTPUT_NAME).zip $(OUTPUT_NAME)
10874
@echo $(OUTPUT_NAME).zip ready
10975

0 commit comments

Comments
 (0)