diff options
author | VirtualTam <virtualtam@flibidi.net> | 2016-07-26 22:13:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-26 22:13:53 +0200 |
commit | efc0c865ba914e75a6c3c9220450d13f752c7afa (patch) | |
tree | 3d71f09ef5ea21fa152cf7d177e490b8452aef23 | |
parent | 2795cf5e1cbe06af418c8a9f57b2c368ac0533ae (diff) | |
parent | 559315ba0a89e306bc46d0a540f1536193860580 (diff) | |
download | Shaarli-efc0c865ba914e75a6c3c9220450d13f752c7afa.tar.gz Shaarli-efc0c865ba914e75a6c3c9220450d13f752c7afa.tar.zst Shaarli-efc0c865ba914e75a6c3c9220450d13f752c7afa.zip |
Merge pull request #608 from virtualtam/refactor/bookmark-parser
Reference netscape-bookmark-parser & allow generating custom release archives
-rw-r--r-- | .gitignore | 16 | ||||
-rw-r--r-- | Makefile | 30 | ||||
-rw-r--r-- | composer.json | 9 |
3 files changed, 47 insertions, 8 deletions
@@ -1,4 +1,4 @@ | |||
1 | # Ignore data/, tmp/, cache/ and pagecache/ | 1 | # Shaarli runtime resources |
2 | data | 2 | data |
3 | tmp | 3 | tmp |
4 | cache | 4 | cache |
@@ -9,18 +9,22 @@ pagecache | |||
9 | .buildpath | 9 | .buildpath |
10 | .project | 10 | .project |
11 | 11 | ||
12 | # Ignore raintpl generated pages | 12 | # Raintpl generated pages |
13 | *.rtpl.php | 13 | *.rtpl.php |
14 | 14 | ||
15 | # Ignore test dependencies | 15 | # 3rd-party dependencies |
16 | composer.lock | 16 | composer.lock |
17 | /vendor/ | 17 | vendor/ |
18 | 18 | ||
19 | # Ignore development and test resources | 19 | # Release archives |
20 | *.tar | ||
21 | *.zip | ||
22 | |||
23 | # Development and test resources | ||
20 | coverage | 24 | coverage |
21 | doxygen | 25 | doxygen |
22 | sandbox | 26 | sandbox |
23 | phpmd.html | 27 | phpmd.html |
24 | 28 | ||
25 | # Ignore user plugin configuration | 29 | # User plugin configuration |
26 | plugins/*/config.php | 30 | plugins/*/config.php |
@@ -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 | ## | ||
139 | ARCHIVE_VERSION := shaarli-$$(git describe)-full | ||
140 | |||
141 | release_archive: release_tar release_zip | ||
142 | |||
143 | ### download 3rd-party PHP libraries | ||
144 | composer_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 | ||
149 | release_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 | ||
154 | release_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 | ||
diff --git a/composer.json b/composer.json index e419dc11..dc1b509e 100644 --- a/composer.json +++ b/composer.json | |||
@@ -9,8 +9,15 @@ | |||
9 | "wiki": "https://github.com/shaarli/Shaarli/wiki" | 9 | "wiki": "https://github.com/shaarli/Shaarli/wiki" |
10 | }, | 10 | }, |
11 | "keywords": ["bookmark", "link", "share", "web"], | 11 | "keywords": ["bookmark", "link", "share", "web"], |
12 | "repositories": [ | ||
13 | { | ||
14 | "type": "vcs", | ||
15 | "url": "https://github.com/shaarli/netscape-bookmark-parser" | ||
16 | } | ||
17 | ], | ||
12 | "require": { | 18 | "require": { |
13 | "php": ">=5.3.4" | 19 | "php": ">=5.3.4", |
20 | "kafene/netscape-bookmark-parser": "dev-shaarli-stable" | ||
14 | }, | 21 | }, |
15 | "require-dev": { | 22 | "require-dev": { |
16 | "phpmd/phpmd" : "@stable", | 23 | "phpmd/phpmd" : "@stable", |