Skip to content

Commit

Permalink
chore(release-please): versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
bencromwell committed Jan 18, 2024
1 parent 72db4de commit b861b71
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.4.0
3 changes: 1 addition & 2 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
"bootstrap-sha": "426c4620d806ddc37828fe9b37c8aef186d1b9bf",
"packages": {
".": {
"release-type": "simple",
"release-type": "php",
"changelog-path": "CHANGELOG.md",
"extra-files": [],
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"draft": false,
Expand Down
10 changes: 4 additions & 6 deletions src/ClientFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@

class ClientFactory
{
/**
* Updted by release-please
*/
private const VERSION = '3.0.0'; // x-release-please-version

/**
* @var string Your API key from Katapult.
*/
Expand All @@ -31,6 +26,8 @@ class ClientFactory
*/
private string $host = 'api.katapult.io';

private string $version;

/**
* @var ClientInterface|null Optional HTTP client to use, if you don't want to rely on php-http/discovery.
*/
Expand All @@ -39,6 +36,7 @@ class ClientFactory
public function __construct(string $token)
{
$this->token = $token;
$this->version = trim(file_get_contents(__DIR__ . '/../VERSION'));
}

/**
Expand Down Expand Up @@ -84,7 +82,7 @@ public function create(): Client

$plugins[] = new HeaderSetPlugin([
'Authorization' => 'Bearer ' . $this->token,
'User-Agent' => 'KatapultAPIClientPHP/' . self::VERSION,
'User-Agent' => 'KatapultAPIClientPHP/' . $this->version,
]);

$plugins[] = new ErrorPlugin();
Expand Down

0 comments on commit b861b71

Please sign in to comment.