-
Notifications
You must be signed in to change notification settings - Fork 311
Phar Building #264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phar Building #264
Changes from all commits
ee1c514
7439b87
b769781
c1ac259
c199daa
d95073d
a3b1981
64c3885
45168a8
0119106
cc3249e
6576cf5
f7f1c88
e42d3a9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 was deleted.
| 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" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems you broke support for
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I added corresponding instructions to the developer docs that they have to be called |
||
|
|
||
| .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 | ||
|
|
||
| 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" | ||
| ], | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: I should understand what all the things in this file do, and take a look at box. |
||
| "main": "vendor/autoload.php", | ||
| "output": "defuse-crypto.phar", | ||
| "stub": true | ||
| } | ||
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paragonie-scott: Does this change look good to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing I'm unsure of is the change to using
classmapin composer.json. Do we even need to keepautoload.phpanymore? If we're keepingautoload.phpso that people can require it from a git clone of the repository, then I want composer to use that just so we'll be notified earlier in case it breaks.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm going to revert this one change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait, we want to get rid of
random_compat, so I'll delete that andautoload.phpand keep this change.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it was all needed, the cleanups were listed as todo items in #258, but somewhy it was closed pointing here, but no back reference to the previous task. i was waiting for base grounds to be settled before actual removing outdated artifacts.
in short: autoload.php file is no longer needed, but change from "files" to "classmap" is needed.