Skip to content

Commit

Permalink
Add create and sign phar file
Browse files Browse the repository at this point in the history
- Add documentation for end users how to verify the
  phar file
- Add composer scripts to automate generating and
  signing the phar file
  • Loading branch information
David Weichert committed Dec 6, 2020
1 parent 807897b commit afdd18b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
build/
vendor/
createPhar
createPhar.asc
composer.lock
docker-compose.yml
phpunit.phar
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ If you specify a locale as a second argument the format string options
(see below) for the given locale will be shown:

$ ./ddate.phar --help de

The releases are signed using the GPG-key with the ID
```A6FED5506250B129``` and the Fingerprint ```F1F7 A70A 51E2 D0FA 0903
65B7 A6FE D550 6250 B129```

You can verify the PHAR file using these commmands:

$ gpg --keyserver pgp.mit.edu --recv-key 0xA6FED5506250B129
$ gpg --fingerprint A6FED5506250B129
$ gpg --verify ddate.phar.asc ddate.phar

## Usage

Expand Down Expand Up @@ -145,4 +155,4 @@ Pope Rotund Deluxe

Bureflux, 3179

(last updated: Prickle-Prickle, 47th of The Aftermath, 3186)
(last updated: Prickle-Prickle, 48th of The Aftermath, 3186)
29 changes: 29 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,34 @@
},
"suggest": {
"ext-calendar": "Performance improvement for calculating Easter/Erister"
},
"scripts": {
"buildphar" : [
"rm -rf vendor",
"composer install --no-dev --prefer-dist",
"curl -o createPhar -L https://api.getlatestassets.com/github/MacFJA/PharBuilder/phar-builder.phar",
"curl -o createPhar.asc -L https://api.getlatestassets.com/github/MacFJA/PharBuilder/phar-builder.phar.asc",
"chmod 755 createPhar",
"mkdir -p ./build/phar/",
"php -d phar.readonly=0 ./createPhar package composer.json"
],
"signphar": [
"gpg -u 0xA6FED5506250B129 --armor --detach-sig --output ./build/phar/ddate.phar.asc --sign ./build/phar/ddate.phar"
]
},
"extra": {
"phar-builder": {
"compression": "GZip",
"name": "ddate.phar",
"output-dir": "./build/phar",
"entry-point": "./bin/ddate",
"include-dev": false,
"include": [
"bin",
"src",
"vendor"
],
"skip-shebang": false
}
}
}

0 comments on commit afdd18b

Please sign in to comment.