Skip to content

Commit

Permalink
Trying to fix builder script (versions) (3.0.0-rc5)
Browse files Browse the repository at this point in the history
  • Loading branch information
hexplor committed May 22, 2023
1 parent 8ba3038 commit 14f1290
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ foreach ($argv as $arg) {

$base = dirname(__DIR__);
if (false === $hasVersion) {
$file = fopen("{$base}/CHANGELOG.md", 'rb');
$file = fopen("{$base}/CHANGELOG.md",'rb');
if (preg_match('/^# (\d\.\d+.\d+(-[a-z0-9.]+)?)\s*$/i', fgets($file), $matches) !== 1) {
echo 'First line of CHANGELOG.md has wrong Gantry version format, aborting';
return 1;
Expand All @@ -52,14 +52,13 @@ if (false === $hasVersion) {
$version .= '-' . $commitShort;

$argv[] = '-Dstr.fileversion=_' . $branch;
if (!empty($commit)) {
$argv[] = '-Dcommit=' . $commit;
}
$argv[] = '-Dcommit=' . $commit;
}

$argv[] = '-Dxml.version=' . $version;
}

$command = 'vendor/bin/phing ' . implode(' ', $argv);
echo "Running command: {$command}\n";
if (false === system($command, $result) || $result) {
throw new \RuntimeException('Failed to run build script');
}
6 changes: 3 additions & 3 deletions bin/builder/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
<property name="path.src" value="${project_dir}/src" />
<property name="path.themes" value="${project_dir}/themes" />
<tstamp>
<format property="str.datefmt" pattern="MMMM d, yyyy" locale="en"/>
<format property="str.datefmt" pattern="${cfg.datefmt}" />
</tstamp>
<tstamp>
<format property="str.datexml" pattern="MMMM d, yyyy" locale="en"/>
<format property="str.datexml" pattern="${cfg.date}" />
</tstamp>
<property name="version.date" value="${str.datexml}" />

Expand Down Expand Up @@ -239,4 +239,4 @@
<target name="wordpress-prod" depends="preflight,info,mkdir,wordpress,cleanup,postflight" />
<target name="grav-prod" depends="preflight,info,mkdir,grav,cleanup,postflight" />

</project>
</project>

0 comments on commit 14f1290

Please sign in to comment.