diff --git a/.gitignore b/.gitignore index 9545a98..5b5f0a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /slt.tar.gz +/slt-update.xml *~ diff --git a/Makefile b/Makefile index bd5e7ea..1801dc3 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,13 @@ # 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) @@ -11,13 +18,24 @@ slt.tar.gz: cd slt ; tar czf ../$@ * .PHONY: release -release: +release: slt.tar.gz ./scripts/create-release.sh .PHONY: upload -upload: +upload: release + $(MAKE) reupload + +.PHONY: slt-update.xml +slt-update.xml: ./scripts/create-update-xml.sh -# rsync -a releases/ $UPDATE_PATH/rel + +.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 diff --git a/res/postfix.template b/res/postfix.template new file mode 100644 index 0000000..769fb5f --- /dev/null +++ b/res/postfix.template @@ -0,0 +1 @@ + diff --git a/res/prefix.template b/res/prefix.template new file mode 100644 index 0000000..ab72107 --- /dev/null +++ b/res/prefix.template @@ -0,0 +1,2 @@ + + diff --git a/res/update.template b/res/update.template new file mode 100644 index 0000000..a401a82 --- /dev/null +++ b/res/update.template @@ -0,0 +1,16 @@ + + SLT Template + Template for the SLT for the Joomla! CMS + slt + template + 0 + __VERSION__ + + __DOWNLOAD_URL__ + + + stable + + Christian Wolf + + diff --git a/scripts/create-update-xml.sh b/scripts/create-update-xml.sh index e69de29..94ff32f 100755 --- a/scripts/create-update-xml.sh +++ b/scripts/create-update-xml.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# DL_PREFIX="https://slt.wolf-stuttgart.net/update/template" + +cat res/prefix.template > slt-update.xml + +find releases -name slt-\* | while read f +do + + VSTR=`echo "$f" | sed -E 's@releases/slt-@@; s@^([0-9]+\.[0-9]+\.[0-9]+).*$@\1@'` + + FILE=`echo "$f" | sed 's@releases/@@'` + FORMAT=`echo "$f" | sed -E 's@^.*[0-9]+\.[0-9]+\.[0-9]+\.@@'` + + sed ' + s@__VERSION__@'"$VSTR"'@g; + s@__DOWNLOAD_URL__@'"$DL_PREFIX/files/$FILE"'@g; + s@__FORMAT__@'"$FORMAT"'@g + ' res/update.template >> slt-update.xml + +done + +cat res/postfix.template >> slt-update.xml diff --git a/serial/release b/serial/release index d00491f..00750ed 100644 --- a/serial/release +++ b/serial/release @@ -1 +1 @@ -1 +3 diff --git a/slt/templateDetails.xml b/slt/templateDetails.xml index a011635..dbae05c 100644 --- a/slt/templateDetails.xml +++ b/slt/templateDetails.xml @@ -10,15 +10,15 @@ SLT SLT - 11.03.2017 + 25.03.2019 Christian Wolf - christianlupus@web.de + homepage@slt.wolf-stuttgart.net - 0.0.2 + 0.0.3 @@ -112,7 +112,7 @@ - + + http://slt.wolf-stuttgart.net/update/template/slt-update.xml +