Skip to content

Commit 556c221

Browse files
authored
Merge pull request #207 from coenjacobs/pre-release/1.1.0-beta-review
Pre-release review: code quality, CI, and distribution improvements
2 parents 806e68c + 4eecd1e commit 556c221

18 files changed

Lines changed: 4502 additions & 45 deletions

.gitattributes

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Line ending normalization
2+
* text=auto
3+
4+
# Export ignore (keeps Composer installs lean)
5+
/.claude/ export-ignore
6+
/.github/ export-ignore
7+
/docker/ export-ignore
8+
/docs/ export-ignore
9+
/tests/ export-ignore
10+
.dockerignore export-ignore
11+
.gitattributes export-ignore
12+
.gitignore export-ignore
13+
.phpactor.json export-ignore
14+
CLAUDE.md export-ignore
15+
composer.lock export-ignore
16+
Dockerfile export-ignore
17+
docker-compose.yml export-ignore
18+
mozart.code-workspace export-ignore
19+
phpcs.xml.dist export-ignore
20+
phpmd.xml.dist export-ignore
21+
phpstan.neon.dist export-ignore
22+
phpunit.xml.dist export-ignore

.github/workflows/docker-dev.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches:
66
- master
77

8+
permissions:
9+
contents: read
10+
packages: write
11+
812
jobs:
913
docker:
1014
runs-on: ubuntu-latest

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
pull_request:
88
types: [opened, synchronize, reopened]
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
linting:
1215
runs-on: ubuntu-latest

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
contents: write
9+
packages: write
10+
711
jobs:
812
create-phar:
913
runs-on: ubuntu-latest

.github/workflows/retag-docker.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
required: true
99
type: string
1010

11+
permissions:
12+
contents: read
13+
packages: write
14+
1115
jobs:
1216
get-release-info:
1317
runs-on: ubuntu-latest

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.idea/
22
vendor/
3-
composer.lock
43

54
.DS_Store
65

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,3 @@ LABEL org.opencontainers.image.version="${VERSION}" \
4343
RUN mkdir project
4444
WORKDIR /project/
4545
COPY --from=packager /mozart/ /mozart/
46-
COPY ./bin/ /mozart/bin/
47-
COPY ./src/ /mozart/src/

bin/mozart

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
#!/usr/bin/env php
22
<?php
33
call_user_func(function ($version) {
4-
if( ! Phar::running() ) {
4+
if (!Phar::running()) {
55
if (is_file($autoload = getcwd() . '/vendor/autoload.php')) {
66
require $autoload;
77
} elseif (is_file($autoload = getcwd() . '/../../autoload.php')) {
88
require $autoload;
99
}
1010

11-
if ( is_file( $autoload = __DIR__ . '/../vendor/autoload.php' ) ) {
12-
require( $autoload );
13-
} elseif ( is_file( $autoload = __DIR__ . '/../../../autoload.php' ) ) {
14-
require( $autoload );
15-
} else {
16-
fwrite( STDERR,
17-
'You must set up the project dependencies, run the following commands:' . PHP_EOL .
18-
'curl -s http://getcomposer.org/installer | php' . PHP_EOL .
19-
'php composer.phar install' . PHP_EOL
20-
);
21-
exit( 1 );
22-
}
23-
} else {
24-
include 'phar://mozart.phar/vendor/autoload.php';
11+
if (is_file($autoload = __DIR__ . '/../vendor/autoload.php')) {
12+
require $autoload;
13+
} elseif (is_file($autoload = __DIR__ . '/../../../autoload.php')) {
14+
require $autoload;
15+
} else {
16+
fwrite(
17+
STDERR,
18+
'You must set up the project dependencies, run the following commands:' . PHP_EOL .
19+
'curl -s http://getcomposer.org/installer | php' . PHP_EOL .
20+
'php composer.phar install' . PHP_EOL
21+
);
22+
exit(1);
23+
}
24+
} else {
25+
include 'phar://mozart.phar/vendor/autoload.php';
2526
}
2627

2728
$app = new CoenJacobs\Mozart\Console\Application($version);

0 commit comments

Comments
 (0)