-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #264 from defuse/phar-create
Phar Building
- Loading branch information
Showing
25 changed files
with
137 additions
and
1,360 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
test/unit/File/big-generated-file | ||
*~ | ||
/test/unit/File/big-generated-file | ||
/composer.lock | ||
/vendor | ||
defuse-crypto.phar | ||
defuse-crypto.phar.sig | ||
composer.phar | ||
box.phar | ||
phpunit.phar | ||
phpunit.phar.asc | ||
test/unit/File/tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This builds defuse-crypto.phar. To run this Makefile, `box` and `composer` | ||
# must be installed and in your $PATH. Run it from inside the dist/ directory. | ||
|
||
box := $(shell which box) | ||
composer := "composer" | ||
|
||
.PHONY: all | ||
all: sign-phar | ||
|
||
.PHONY: sign-phar | ||
sign-phar: build-phar | ||
gpg -u 7B4B2D98 --armor --output defuse-crypto.phar.sig --detach-sig defuse-crypto.phar | ||
|
||
# ensure we run in clean tree. export git tree and run there. | ||
.PHONY: build-phar | ||
build-phar: | ||
@echo "Creating .phar from revision $(shell git rev-parse HEAD)." | ||
rm -rf worktree | ||
install -d worktree | ||
(cd $(CURDIR)/..; git archive HEAD) | tar -x -C worktree | ||
$(MAKE) -f $(CURDIR)/Makefile -C worktree defuse-crypto.phar | ||
mv worktree/*.phar . | ||
rm -rf worktree | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -vf defuse-crypto.phar defuse-crypto.phar.sig | ||
|
||
# Inside workdir/: | ||
|
||
defuse-crypto.phar: dist/box.json composer.lock | ||
cp dist/box.json . | ||
php -d phar.readonly=0 $(box) build -c box.json -v | ||
|
||
composer.lock: | ||
$(composer) install --no-dev | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"chmod": "0755", | ||
"finder": [ | ||
{ | ||
"in": "src", | ||
"name": "*.php" | ||
}, | ||
{ | ||
"in": "vendor/composer", | ||
"name": "*.php" | ||
}, | ||
{ | ||
"in": "vendor/paragonie", | ||
"name": "*.php", | ||
"exclude": "other" | ||
} | ||
], | ||
"compactors": [ | ||
"Herrera\\Box\\Compactor\\Php" | ||
], | ||
"main": "vendor/autoload.php", | ||
"output": "defuse-crypto.phar", | ||
"stub": true | ||
} |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.