aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2016-07-23 19:26:05 +0200
committerVirtualTam <virtualtam@flibidi.net>2016-07-25 23:54:13 +0200
commit559315ba0a89e306bc46d0a540f1536193860580 (patch)
tree3d71f09ef5ea21fa152cf7d177e490b8452aef23 /Makefile
parent7f5ab8c0a40ebc7f10c2b92f05a475f8c6902948 (diff)
downloadShaarli-559315ba0a89e306bc46d0a540f1536193860580.tar.gz
Shaarli-559315ba0a89e306bc46d0a540f1536193860580.tar.zst
Shaarli-559315ba0a89e306bc46d0a540f1536193860580.zip
Makefile: generate release archives including 3rd-party libraries
Relates to #607 Archive creation process (tar, zip): - let Composer resolve functional (no-dev) dependencies - call git-archive to generate a release archive - include 3rd-party dependencies to the generated archive Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 29 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 52d20090..22be0d96 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
1# The personal, minimalist, super-fast, database free, bookmarking service. 1# The personal, minimalist, super-fast, database free, bookmarking service.
2# Makefile for PHP code analysis & testing 2# Makefile for PHP code analysis & testing, documentation and release generation
3 3
4# Prerequisites: 4# Prerequisites:
5# - install Composer, either: 5# - install Composer, either:
@@ -128,6 +128,34 @@ test:
128 @$(BIN)/phpunit tests 128 @$(BIN)/phpunit tests
129 129
130## 130##
131# Custom release archive generation
132#
133# For each tagged revision, GitHub provides tar and zip archives that correspond
134# to the output of git-archive
135#
136# These targets produce similar archives, featuring 3rd-party dependencies
137# to ease deployment on shared hosting.
138##
139ARCHIVE_VERSION := shaarli-$$(git describe)-full
140
141release_archive: release_tar release_zip
142
143### download 3rd-party PHP libraries
144composer_dependencies: clean
145 composer update --no-dev
146 find vendor/ -name ".git" -type d -exec rm -rf {} +
147
148### generate a release tarball and include 3rd-party dependencies
149release_tar: composer_dependencies
150 git archive -o $(ARCHIVE_VERSION).tar HEAD
151 tar rvf $(ARCHIVE_VERSION).tar vendor/
152
153### generate a release zip and include 3rd-party dependencies
154release_zip: composer_dependencies
155 git archive -o $(ARCHIVE_VERSION).zip -9 HEAD
156 zip -r $(ARCHIVE_VERSION).zip vendor/
157
158##
131# Targets for repository and documentation maintenance 159# Targets for repository and documentation maintenance
132## 160##
133 161