0
0
Fork 0
This repository has been archived on 2024-05-09. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
factorio-spaghetti-lockdown/makefile
2019-02-24 18:14:42 -08:00

34 lines
867 B
Makefile

VERSION = `jq -r .version info.json`
NAME = `jq -r .name info.json`
RELEASE_NAME = $(NAME)_$(VERSION)
# target: all - Default target. Does nothing.
all:
echo "Try 'make help'"
# target: help - Display callable targets.
help:
egrep "^# target:" [Mm]akefile
# target: tag - Tag a release.
tag:
git tag -f $(VERSION)
# target: push_tag - Push tag to GitHub.
push_tag:
git push origin $(VERSION)
# target: clean - Clean the links and zip files from the dev/dist process
clean:
rm -f ./*.zip
rm -f $(HOME)/Library/Application\ Support/factorio/mods/$(NAME)*
# target: link - Link the existing folder to the Factorio location for macOS
link:
make clean
ln -s "`pwd`/" "$(HOME)/Library/Application Support/factorio/mods/$(RELEASE_NAME)"
# target: dist - Make a release.
dist:
make clean
git archive --prefix "$(RELEASE_NAME)/" -o "$(RELEASE_NAME).zip" HEAD