Skip to content

Commit

Permalink
Merge pull request #175 from maxmind/greg/fix-phar
Browse files Browse the repository at this point in the history
Allow Phar to work outside of CLI applications. Closes #174.
  • Loading branch information
ugexe committed Nov 23, 2021
2 parents 7644582 + 56f2037 commit 79141db
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,13 @@
CHANGELOG
=========

2.12.1
-------------------

* The `geoip2.phar` included in 2.12.0 would only work in CLI applications.
This was due to a change in Box 3.x. The Phar should now work in all
applications. This release only affects users of the Phar file.

2.12.0 (2021-11-18)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion README.dev.md
Expand Up @@ -5,7 +5,7 @@ Steps for releasing:
2. Bump copyright year in `README.md`, if necessary.
3. Review `CHANGELOG.md` for completeness and correctness. Update its release
date.
4. Install or update [hub](https://github.com/github/hub) as it used by the
4. Install or update [gh](https://github.com/cli/cli) as it used by the
release script.
5. Run `./dev-bin/release.sh`. This will build the phar, generate the docs,
tag the release, push it to origin, and update the GH releases with the
Expand Down
7 changes: 3 additions & 4 deletions box.json
@@ -1,6 +1,6 @@
{
"alias": "geoip2.phar",
"main": "phar-stub.php",
"stub": "phar-stub.php",
"main": false,
"output": "geoip2.phar",
"compactors": [
"KevinGH\\Box\\Compactor\\Php",
Expand Down Expand Up @@ -36,6 +36,5 @@
"in": "src"
}
],
"git-version": "git-version",
"shebang": false
"git-version": "git-version"
}
2 changes: 1 addition & 1 deletion dev-bin/release.sh
Expand Up @@ -142,6 +142,6 @@ message="$version
$notes"

hub release create -a "$phar" -m "$message" "$tag"
gh release create --target "$(git branch --show-current)" -n "$message" "$tag" "$phar"

git push --tags
2 changes: 2 additions & 0 deletions phar-stub.php
@@ -1,3 +1,5 @@
<?php

require_once 'phar://geoip2.phar/vendor/autoload.php';

__HALT_COMPILER();

0 comments on commit 79141db

Please sign in to comment.