]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Update release archive generation 661/head
authorVirtualTam <virtualtam@flibidi.net>
Sun, 16 Oct 2016 17:33:29 +0000 (19:33 +0200)
committerVirtualTam <virtualtam@flibidi.net>
Wed, 19 Oct 2016 17:50:12 +0000 (19:50 +0200)
Relates to https://github.com/shaarli/Shaarli/issues/607
Relates to https://github.com/shaarli/Shaarli/pull/608

Modifications:
- match the arborescence of the archives provided by GitHub
- generate compressed tarballs

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
CHANGELOG.md
Makefile

index 23128b237f3ce75eeba47eed9ddd9273cd571e59..5bd16dcd285e62ecf0058f632ce672365fae0147 100644 (file)
@@ -6,23 +6,26 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
 
 
 ## [v0.8.1](https://github.com/shaarli/Shaarli/releases/tag/v0.8.1) - UNPUBLISHED
-## Added
+### Added
 - Add CHANGELOG.md to track the whole project's history
 - Save the last edition date for shaares and use it in Atom/RSS feeds
 - Plugins:
     - Add an [Isso](https://posativ.org/isso/) plugin to enable user comments on permalinks
     - Allow defining init functions, e.g. for performing checks and error processing
 
-## Changed
+### Changed
 - Cleanup `{loop}` declarations in templates
+- Release archives now have the same structure as GitHub-generated archives:
+    - archives contain a `Shaarli` directory, itself containing sources + dependencies
+    - the tarball is now gzipped
 
-## Fixed
+### Fixed
 - Fix the server `<self>` value in Atom/RSS feeds
 - Plugins:
     - Tools: only display parameter description when it exists
     - archive.org: do not propose archival of private notes
 
-## Security
+### Security
 - Allow whitelisting trusted IPs, else continue banning clients upon login failure
 
 
index 22be0d96c36875614958ccd481f1f00bc20bd8fa..60aec9a08b6049328ee031dd7e19fbaeafc8664e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -137,6 +137,7 @@ test:
 # to ease deployment on shared hosting.
 ##
 ARCHIVE_VERSION := shaarli-$$(git describe)-full
+ARCHIVE_PREFIX=Shaarli/
 
 release_archive: release_tar release_zip
 
@@ -147,13 +148,17 @@ composer_dependencies: clean
 
 ### generate a release tarball and include 3rd-party dependencies
 release_tar: composer_dependencies
-       git archive -o $(ARCHIVE_VERSION).tar HEAD
-       tar rvf $(ARCHIVE_VERSION).tar vendor/
+       git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).tar HEAD
+       tar rvf $(ARCHIVE_VERSION).tar --transform "s|^vendor|$(ARCHIVE_PREFIX)vendor|" vendor/
+       gzip $(ARCHIVE_VERSION).tar
 
 ### generate a release zip and include 3rd-party dependencies
 release_zip: composer_dependencies
-       git archive -o $(ARCHIVE_VERSION).zip -9 HEAD
-       zip -r $(ARCHIVE_VERSION).zip vendor/
+       git archive --prefix=$(ARCHIVE_PREFIX) -o $(ARCHIVE_VERSION).zip -9 HEAD
+       mkdir $(ARCHIVE_PREFIX)
+       rsync -a vendor/ $(ARCHIVE_PREFIX)vendor/
+       zip -r $(ARCHIVE_VERSION).zip $(ARCHIVE_PREFIX)vendor/
+       rm -rf $(ARCHIVE_PREFIX)
 
 ##
 # Targets for repository and documentation maintenance