2018-11-16 11:25:16 +00:00
|
|
|
VERSION=$(shell php -r 'include("inc/inc.Version.php"); $$v=new SeedDMS_Version(); echo $$v->version();')
|
2020-10-21 07:36:43 +00:00
|
|
|
SRC=CHANGELOG inc conf utils index.php .htaccess languages op out controllers doc TODO LICENSE webdav install restapi pdfviewer
|
2021-05-12 09:39:30 +00:00
|
|
|
VIEWS ?= bootstrap bootstrap4
|
2011-01-10 17:08:44 +00:00
|
|
|
|
2022-01-31 11:05:48 +00:00
|
|
|
NODISTFILES=utils/importmail.php utils/seedddms-importmail utils/remote-email-upload utils/remote-upload utils/da-bv-reminder.php utils/seeddms-da-bv-reminder utils/relodge.php utils/seeddms-relodge .svn .gitignore
|
2017-01-06 06:21:02 +00:00
|
|
|
|
2020-09-14 11:07:58 +00:00
|
|
|
PHPDOC=~/Downloads/phpDocumentor.phar
|
2014-11-19 16:03:34 +00:00
|
|
|
|
2011-01-10 17:08:44 +00:00
|
|
|
dist:
|
2013-02-14 11:10:53 +00:00
|
|
|
mkdir -p tmp/seeddms-$(VERSION)
|
|
|
|
cp -a $(SRC) tmp/seeddms-$(VERSION)
|
2020-10-21 07:36:43 +00:00
|
|
|
mkdir -p tmp/seeddms-$(VERSION)/views
|
|
|
|
mkdir -p tmp/seeddms-$(VERSION)/styles
|
|
|
|
for view in $(VIEWS) ; do \
|
|
|
|
if [ -d "views/$$view" ] ; then \
|
|
|
|
cp -a views/$$view tmp/seeddms-$(VERSION)/views ; \
|
|
|
|
fi ; \
|
|
|
|
if [ -d "styles/$$view" ] ; then \
|
|
|
|
cp -a styles/$$view tmp/seeddms-$(VERSION)/styles ; \
|
|
|
|
fi ; \
|
|
|
|
done
|
2018-03-14 09:14:18 +00:00
|
|
|
(cd tmp/seeddms-$(VERSION); rm -rf $(NODISTFILES); mv conf conf.template)
|
2020-10-21 07:36:43 +00:00
|
|
|
(cd tmp; tar --exclude=.svn --exclude=.gitignore -czvf ../seeddms-$(VERSION).tar.gz seeddms-$(VERSION))
|
2011-01-10 17:08:44 +00:00
|
|
|
rm -rf tmp
|
|
|
|
|
2021-11-26 11:33:08 +00:00
|
|
|
quickstart:
|
|
|
|
vendor/bin/phing -Dversion=$(VERSION) package
|
|
|
|
|
2022-02-17 11:31:22 +00:00
|
|
|
unittest:
|
|
|
|
vendor/bin/phing -Dversion=$(VERSION) phpunitfast
|
|
|
|
|
2011-01-10 17:08:44 +00:00
|
|
|
pear:
|
2013-02-14 11:10:53 +00:00
|
|
|
(cd SeedDMS_Core/; pear package)
|
|
|
|
(cd SeedDMS_Lucene/; pear package)
|
|
|
|
(cd SeedDMS_Preview/; pear package)
|
2015-08-10 19:39:40 +00:00
|
|
|
(cd SeedDMS_SQLiteFTS/; pear package)
|
2011-01-10 17:08:44 +00:00
|
|
|
|
|
|
|
webdav:
|
2013-02-14 11:10:53 +00:00
|
|
|
mkdir -p tmp/seeddms-webdav-$(VERSION)
|
|
|
|
cp webdav/* tmp/seeddms-webdav-$(VERSION)
|
|
|
|
(cd tmp; tar --exclude=.svn -czvf ../seeddms-webdav-$(VERSION).tar.gz seeddms-webdav-$(VERSION))
|
2011-01-10 17:08:44 +00:00
|
|
|
rm -rf tmp
|
|
|
|
|
2013-05-29 16:16:38 +00:00
|
|
|
webapp:
|
|
|
|
mkdir -p tmp/seeddms-webapp-$(VERSION)
|
|
|
|
cp -a restapi webapp tmp/seeddms-webapp-$(VERSION)
|
|
|
|
(cd tmp; tar --exclude=.svn -czvf ../seeddms-webapp-$(VERSION).tar.gz seeddms-webapp-$(VERSION))
|
|
|
|
rm -rf tmp
|
|
|
|
|
2018-03-23 16:45:32 +00:00
|
|
|
repository:
|
|
|
|
mkdir -p tmp/seeddms-repository-$(VERSION)
|
|
|
|
cp -a repository/www repository/utils repository/doc tmp/seeddms-repository-$(VERSION)
|
2019-07-10 17:31:33 +00:00
|
|
|
rm -f tmp/seeddms-repository/utils/update-repository.log
|
2018-03-23 16:45:32 +00:00
|
|
|
mkdir -p tmp/seeddms-repository-$(VERSION)/files
|
|
|
|
mkdir -p tmp/seeddms-repository-$(VERSION)/accounts
|
|
|
|
cp -a repository/files/.htaccess tmp/seeddms-repository-$(VERSION)/files
|
|
|
|
cp -a repository/accounts/.htaccess tmp/seeddms-repository-$(VERSION)/accounts
|
2019-07-10 17:31:33 +00:00
|
|
|
cp inc/inc.ClassExtensionMgr.php tmp/seeddms-repository-$(VERSION)/utils
|
2018-03-23 16:45:32 +00:00
|
|
|
(cd tmp; tar --exclude=.svn -czvf ../seeddms-repository-$(VERSION).tar.gz seeddms-repository-$(VERSION))
|
|
|
|
rm -rf tmp
|
|
|
|
|
2011-01-10 17:08:44 +00:00
|
|
|
doc:
|
2014-11-19 16:03:34 +00:00
|
|
|
$(PHPDOC) -d SeedDMS_Core --ignore 'getusers.php,getfoldertree.php,config.php,reverselookup.php' --force -t html
|
2011-01-10 17:08:44 +00:00
|
|
|
|
2022-11-18 10:22:08 +00:00
|
|
|
# Download apigen with
|
|
|
|
# composer create-project --no-dev apigen/apigen:^7.0@alpha tools/apigen
|
2015-06-24 10:41:26 +00:00
|
|
|
apidoc:
|
2022-11-18 10:22:08 +00:00
|
|
|
tools/apigen/bin/apigen SeedDMS_Core/Core --exclude "tests/*" --output html
|
2015-06-24 10:41:26 +00:00
|
|
|
|
2023-01-20 09:48:28 +00:00
|
|
|
# Turn the package.xml file into CHANGELOG.md
|
|
|
|
#
|
|
|
|
# The idea is to form blocks of lines separated by an empty line.
|
|
|
|
# Echo block consists of the version number, release date und notes.
|
|
|
|
# This blocks are turned into single lines which are than sorted.
|
|
|
|
# Afterwards the single lines are turned back into blocks.
|
|
|
|
#
|
|
|
|
# It first uses sgrep to extract the version, date und notes. This is
|
|
|
|
# feed to sed to isolated the date and version and put them on separate
|
|
|
|
# lines. Each version
|
|
|
|
# forms a block of n lines with the first two being the version and date.
|
|
|
|
# All remaining lines are notes. Blocks are separated by an empty line.
|
|
|
|
# It's important to form blocks without ane empty lines because the following
|
|
|
|
# awk will create a single line from each block which can then be sorted
|
|
|
|
# (or simply reversed in order).
|
|
|
|
# Because the blocks are listed in the wrong order (last version first and
|
|
|
|
# previous version last, e.g. 5.1.29, 3.3.0, 3.3.1, ...., 5.1.27, 5.1.28) they
|
|
|
|
# need to be reversed in order. This is done by turning each block into line
|
|
|
|
# with the former new lines replaced by a '|'. So it's basically a '|' separated
|
|
|
|
# csv file which is then reversed in order by 'sort -r'. In order to separate
|
|
|
|
# blocks by a newline, each line of that output is appended by another
|
|
|
|
# line break. Result is put back
|
|
|
|
# into the original format by replacing all '|' by newline.
|
|
|
|
#
|
|
|
|
changelog:
|
|
|
|
@sgrep 'stag("DATE") .. etag("DATE") or ((stag("RELEASE") .. etag("RELEASE")) in (stag("VERSION") .. etag("VERSION"))) or inner(stag("NOTES") __ etag("NOTES"))' SeedDMS_Core/package.xml | sed -e 's#^ *<date>\([-0-9]*\)</date><release>\([0-9.]*\)</release>#\n\n\2 (\1)\n---------------------#' | awk -F'\n' -vRS='' -vOFS='|' '{$$1=$$1}1' | sort -V -r | sed 's/$$/\n/' | tr '|' '\n'
|
|
|
|
|
|
|
|
.PHONY: doc webdav webapp repository changelog
|