Skip to content

Commit aa0a1b9

Browse files
authored
Merge pull request #3 from wirecli/dev
docs(ci-cd): fixed pulled version number from app
2 parents d4f2daa + 6e7fec2 commit aa0a1b9

File tree

7 files changed

+6163
-970
lines changed

7 files changed

+6163
-970
lines changed

.github/workflows/releases.yml

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,21 @@
1-
name: Releases
2-
on:
3-
push:
4-
branches:
5-
- main
6-
1+
# .github/workflows/release.yml
2+
name: Release
3+
on: workflow_dispatch
74
jobs:
8-
changelog:
9-
runs-on: ubuntu-latest
10-
5+
release:
6+
runs-on: ubuntu-20.04
117
steps:
12-
- uses: actions/checkout@v3
13-
- name: conventional Changelog Action
14-
id: changelog
15-
uses: TriPSs/[email protected]
16-
with:
17-
github-token: ${{ secrets.github_token }}
18-
19-
- name: create release
20-
uses: actions/create-release@v1
21-
if: ${{ steps.changelog.outputs.skipped == 'false' }}
8+
- name: Checkout source code
9+
uses: actions/checkout@v2
10+
- name: Install the dependancies
11+
run: npm ci
12+
- name: Initialize Git user
13+
run: |
14+
git config --global user.email "[email protected]"
15+
git config --global user.name "Release Workflow 🤖"
16+
- name: Log git status
17+
run: git status
18+
- name: Run release
19+
run: npm run release --ci
2220
env:
23-
GITHUB_TOKEN: ${{ secrets.github_token }}
24-
with:
25-
tag_name: ${{ steps.changelog.outputs.tag }}
26-
release_name: ${{ steps.changelog.outputs.tag }}
27-
body: ${{ steps.changelog.outputs.clean_changelog }}
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Whitespace-only changes.

app/version.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"version": "1.4.6"
3+
}

app/wire-cli.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
}
5555

5656
// get version from composer.json
57-
$composer = json_decode(file_get_contents(__DIR__.'/../composer.json'));
58-
$version = $composer->version;
57+
$json = json_decode(file_get_contents(__DIR__.'/version.json'));
58+
$version = join(["v", $json->version]);
5959
$app = new Application('wire-cli - An extendable ProcessWire CLI', $version);
6060

6161
$app->add(new UserCreateCommand());
@@ -102,4 +102,4 @@
102102
$app->add(new LogTailCommand());
103103
$app->add(new LogListCommand());
104104

105-
$app->run();
105+
$app->run();

composer.json

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,56 @@
11
{
2-
"name": "wirecli/wire-cli",
3-
"description": "An extendable ProcessWire command line interface",
4-
"keywords": ["processwire"],
5-
"license": "MIT",
6-
"authors": [
7-
{
8-
"name": "Joani Eizmendi",
9-
"homepage": "https://github.com/flydev-fr"
10-
},
11-
{
12-
"name": "Marcus Herrmann",
13-
"homepage": "https://bigger-on-the-inside.net"
14-
},
15-
{
16-
"name": "Hari K T",
17-
"homepage": "http://harikt.com"
18-
},
19-
{
20-
"name": "Bea David",
21-
"homepage": "http://justonestep.de/"
22-
},
23-
{
24-
"name": "Camilo Castro",
25-
"homepage": "http://www.cervezapps.cl"
26-
}
27-
],
28-
"bin": [
29-
"wirecli"
30-
],
31-
"autoload": {
32-
"psr-4": {
33-
"Wirecli\\": "src/"
34-
}
2+
"name": "wirecli/wire-cli",
3+
"description": "An extendable ProcessWire command line interface",
4+
"keywords": [
5+
"processwire"
6+
],
7+
"license": "MIT",
8+
"authors": [
9+
{
10+
"name": "Joani Eizmendi",
11+
"homepage": "https://github.com/flydev-fr"
3512
},
36-
"require": {
37-
"php": ">=8.1.0",
38-
"guzzlehttp/guzzle": "~7.7",
39-
"monolog/monolog": "~3.4",
40-
"pmjones/auto-shell": "^1.0.1",
41-
"symfony/console": "^6.3",
42-
"symfony/filesystem": "^6.3",
43-
"symfony/process": "^6.3"
13+
{
14+
"name": "Marcus Herrmann",
15+
"homepage": "https://bigger-on-the-inside.net"
4416
},
45-
"require-dev": {
46-
"phpunit/phpunit": "^10.2",
47-
"whatthejeff/nyancat-phpunit-resultprinter": "~1.2"
17+
{
18+
"name": "Hari K T",
19+
"homepage": "http://harikt.com"
4820
},
49-
"extra": {
50-
"symfony": {
51-
"require": "5.2.*"
52-
}
21+
{
22+
"name": "Bea David",
23+
"homepage": "http://justonestep.de/"
24+
},
25+
{
26+
"name": "Camilo Castro",
27+
"homepage": "http://www.cervezapps.cl"
28+
}
29+
],
30+
"bin": [
31+
"wirecli"
32+
],
33+
"autoload": {
34+
"psr-4": {
35+
"Wirecli\\": "src/"
36+
}
37+
},
38+
"require": {
39+
"php": ">=8.1.0",
40+
"guzzlehttp/guzzle": "~7.7",
41+
"monolog/monolog": "~3.4",
42+
"pmjones/auto-shell": "^1.0.1",
43+
"symfony/console": "^6.3",
44+
"symfony/filesystem": "^6.3",
45+
"symfony/process": "^6.3"
46+
},
47+
"require-dev": {
48+
"phpunit/phpunit": "^10.2",
49+
"whatthejeff/nyancat-phpunit-resultprinter": "~1.2"
50+
},
51+
"extra": {
52+
"symfony": {
53+
"require": "5.2.*"
5354
}
55+
}
5456
}

0 commit comments

Comments
 (0)