Skip to content

Commit b149f79

Browse files
committed
Use branch alias to set version
1 parent 35d7396 commit b149f79

File tree

11 files changed

+134
-46
lines changed

11 files changed

+134
-46
lines changed

.github/workflows/documentation.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ jobs:
3131
coverage: "none"
3232
php-version: "8.2"
3333

34+
- name: "Set COMPOSER_ROOT_VERSION"
35+
run: |
36+
echo "COMPOSER_ROOT_VERSION=1.x-dev" >> $GITHUB_ENV
37+
3438
- name: "Install dependencies with Composer"
3539
uses: "ramsey/composer-install@v2"
3640
with:

.github/workflows/integrate.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on: # yamllint disable-line rule:truthy
88
branches:
99
- "main"
1010

11+
env:
12+
ComposerRootVersion: "1.x-dev"
13+
1114
jobs:
1215
code-coverage:
1316
name: "Code Coverage"
@@ -49,6 +52,7 @@ jobs:
4952
uses: "phpDocumentor/.github/.github/workflows/[email protected]"
5053
with:
5154
php-version: "8.2"
55+
composer-root-version: "1.x-dev"
5256

5357
architecture:
5458
name: "Check architecture"
@@ -73,20 +77,24 @@ jobs:
7377
unit-tests:
7478
name: "Unit test"
7579
uses: "phpDocumentor/.github/.github/workflows/[email protected]"
80+
with:
81+
composer-root-version: "1.x-dev"
7682

7783
functional-tests:
7884
name: "Functional test"
7985
uses: "phpDocumentor/.github/.github/workflows/[email protected]"
8086
needs: "unit-tests"
8187
with:
8288
test-suite: "functional"
89+
composer-root-version: "1.x-dev"
8390

8491
integration-tests:
8592
name: "integration test"
8693
uses: "phpDocumentor/.github/.github/workflows/[email protected]"
8794
needs: "unit-tests"
8895
with:
8996
test-suite: "integration"
97+
composer-root-version: "1.x-dev"
9098

9199
xml-lint:
92100
runs-on: "ubuntu-latest"

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,10 @@
7676
"url": "./packages/*",
7777
"type": "path"
7878
}
79-
]
79+
],
80+
"extra": {
81+
"branch-alias": {
82+
"dev-main": "1.x-dev"
83+
}
84+
}
8085
}

composer.lock

Lines changed: 72 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/guides-cli/composer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,19 @@
2727
"require": {
2828
"php": "^8.1",
2929
"monolog/monolog": "^2.9 || ^3.0",
30-
"phpdocumentor/guides": "self.version",
31-
"phpdocumentor/guides-restructured-text": "self.version",
30+
"phpdocumentor/guides": "^1.0",
31+
"phpdocumentor/guides-restructured-text": "^1.0",
3232
"symfony/config": "^5.4 || ^6.3 || ^7.0",
3333
"symfony/console": "^5.4 || ^6.3 || ^7.0",
3434
"symfony/dependency-injection": "^5.4 || ^6.3 || ^7.0",
3535
"symfony/event-dispatcher": "^5.4 || ^6.3 || ^7.0"
3636
},
3737
"bin": [
3838
"bin/guides"
39-
]
39+
],
40+
"extra": {
41+
"branch-alias": {
42+
"dev-main": "1.x-dev"
43+
}
44+
}
4045
}

0 commit comments

Comments
 (0)