template/Makefile

61 lines
1.2 KiB
Makefile

# UPDATE_PATH=/srv/slt-update
PACKAGES = slt.tar.gz
export DL_PREFIX=https://slt.wolf-stuttgart.net/update/template
RSYNC_OPTIONS=-rltDz --delete --delete-delay --delete-excluded --exclude '.gitignore'
RSYNC_USER=christian
RSYNC_HOST=hh.wolf-stuttgart.net
DL_PATH=/srv/http/slt/update/template
all: package
package: $(PACKAGES)
.PHONY: npm
npm:
cd slt; npm i
cd slt; npm run sass
.PHONY: slt.tar.gz
slt.tar.gz: npm
# cd slt ; tar czf ../$@ *
tar czf $@ -C slt \
css/dynamic-styles.css.php css/index.html css/style.css css/.htaccess \
html \
images \
js \
language \
favicon.ico \
index.html \
index.php \
template_preview.png \
template_thumbnail.png \
templateDetails.xml
.PHONY: release
release: slt.tar.gz
./scripts/create-release.sh
.PHONY: upload
upload: release
$(MAKE) reupload
.PHONY: slt-update.xml
slt-update.xml:
./scripts/create-update-xml.sh
.PHONY: reupload
reupload: slt-update.xml
@echo Pushing files
@rsync $(RSYNC_OPTIONS) releases/ $(RSYNC_USER)@$(RSYNC_HOST):$(DL_PATH)/files -v
@echo Pushing XML configuration
@rsync $(RSYNC_OPTIONS) slt-update.xml $(RSYNC_USER)@$(RSYNC_HOST):$(DL_PATH)
#
# .PHONY: update
# update: $(PACKAGES)
# cp slt.xml slt1.tar.gz $(UPDATE_PATH)