Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
hhit
config-generator
Commits
c3665e59
Commit
c3665e59
authored
Mar 03, 2021
by
Hendrik Heneke
Browse files
Prepared phar generation.
parent
a63ae050
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
.gitignore
.gitignore
+1
-0
build-phar.php
build-phar.php
+14
-0
composer.json
composer.json
+3
-1
No files found.
.gitignore
View file @
c3665e59
.idea
.phpunit.result.cache
/build/
/vendor/
build-phar.php
0 → 100644
View file @
c3665e59
<?php
if
(
!
file_exists
(
'build'
))
{
mkdir
(
'build'
);
}
if
(
file_exists
(
'build/cfgen.phar'
))
{
unlink
(
'build/cfgen.phar'
);
}
$pharName
=
'build/cfgen.phar'
;
$p
=
new
Phar
(
$pharName
,
FilesystemIterator
::
CURRENT_AS_FILEINFO
|
FilesystemIterator
::
KEY_AS_FILENAME
,
basename
(
$pharName
));
$p
->
startBuffering
();
$p
->
setStub
(
"#!/usr/bin/env php
\n
<?php Phar::mapPhar(); include
\"
phar://
$pharName
/src/cfgen.php
\"
; __HALT_COMPILER(); ?>"
);
$p
->
buildFromDirectory
(
'.'
,
'/(src|vendor)\/(.*)\.php$/'
,
);
$p
->
stopBuffering
();
chmod
(
'build/cfgen.phar'
,
0755
);
composer.json
View file @
c3665e59
...
...
@@ -44,7 +44,9 @@
"bin/cfgen"
],
"scripts"
:
{
"cfgen:standalone:generate-configs:test"
:
"bin/cfgen cfgen:generate-configs --env test --overwrite"
,
"build:phar"
:
"php -d phar.readonly=0 build-phar.php"
,
"test-run:bin"
:
"bin/cfgen cfgen:generate-configs --env test --project fixture --overwrite"
,
"test-run:phar"
:
"build/cfgen.phar cfgen:generate-configs --env test --project fixture --overwrite"
,
"php-cs:check"
:
"php-cs-fixer fix --dry-run --stop-on-violation --using-cache=no --rules=-line_ending src"
,
"php-cs:fix"
:
"php-cs-fixer fix --using-cache=no src"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment