changing icalparser integration and package building
This commit is contained in:
parent
6165de6085
commit
fe907ad683
20
Makefile
20
Makefile
|
@ -2,18 +2,26 @@
|
||||||
NAME = kal3000-gcal-import
|
NAME = kal3000-gcal-import
|
||||||
ICALPARSER = icalparser
|
ICALPARSER = icalparser
|
||||||
INSTALLDIR = /usr/share/wordpress/wp-content/plugins/$(NAME)
|
INSTALLDIR = /usr/share/wordpress/wp-content/plugins/$(NAME)
|
||||||
|
SSHACCOUNT = root@ubuntu1804
|
||||||
VERSION = 0.1.0
|
VERSION = 0.1.0
|
||||||
|
|
||||||
release:
|
|
||||||
( cd .. ; zip -9 -r $(NAME)-$(VERSION).zip $(ICALPARSER)/readme.md $(ICALPARSER)/src/* $(ICALPARSER)/tools/* $(NAME)/*.php $(NAME)/*.txt)
|
|
||||||
|
|
||||||
install:
|
# Make sure we always ship the latest icalparser version
|
||||||
mkdir -p $(INSTALLDIR)
|
icalparser:
|
||||||
cp -vu *.txt *.php $(INSTALLDIR)
|
if [ -d icalparser ] ; then \
|
||||||
chown -R www-data:www-data $(INSTALLDIR)
|
cd icalparser && git pull ; \
|
||||||
|
else \
|
||||||
|
git clone https://github.com/OzzyCzech/icalparser ; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
release: icalparser
|
||||||
|
cd .. ; \
|
||||||
|
zip -9 -r $(NAME)-$(VERSION).zip $(NAME)/$(ICALPARSER)/readme.md $(NAME)/$(ICALPARSER)/src/* $(NAME)/$(ICALPARSER)/tools/* $(NAME)/*.php $(NAME)/readme.* $(NAME)/README.*
|
||||||
|
|
||||||
|
|
||||||
|
install: icalparser
|
||||||
|
rsync --delete -C -av ./ $(SSHACCOUNT):$(INSTALLDIR)
|
||||||
|
ssh $(SSHACCOUNT) chown -R www-data:www-data $(INSTALLDIR)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -201,10 +201,10 @@ function gcal_import_do_import($category, $link) {
|
||||||
|
|
||||||
error_log ("entering gcal_import_do_import($category, $link)");
|
error_log ("entering gcal_import_do_import($category, $link)");
|
||||||
|
|
||||||
require_once dirname (__FILE__) . '/../icalparser/src/IcalParser.php';
|
require_once dirname (__FILE__) . '/icalparser/src/IcalParser.php';
|
||||||
require_once dirname (__FILE__) . '/../icalparser/src/Recurrence.php';
|
require_once dirname (__FILE__) . '/icalparser/src/Recurrence.php';
|
||||||
require_once dirname (__FILE__) . '/../icalparser/src/Freq.php';
|
require_once dirname (__FILE__) . '/icalparser/src/Freq.php';
|
||||||
require_once dirname (__FILE__) . '/../icalparser/src/WindowsTimezones.php';
|
require_once dirname (__FILE__) . '/icalparser/src/WindowsTimezones.php';
|
||||||
|
|
||||||
$cal = new \om\IcalParser();
|
$cal = new \om\IcalParser();
|
||||||
$results = $cal->parseFile($link);
|
$results = $cal->parseFile($link);
|
||||||
|
|
Reference in a new issue