Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,17 @@ if (false === $hasVersion) {
}

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

$blueprints = "{$base}/platforms/grav/gantry5/blueprints.yaml";
if (file_exists($blueprints)) {
$content = file_get_contents($blueprints);
$content = preg_replace("/version:\s*['\"]?@version@['\"]?/", "version: '{$version}'", $content);
file_put_contents($blueprints, $content);
}

}

$command = 'vendor/bin/phing ' . implode(' ', $argv);
$command = escapeshellarg($base . '/vendor/bin/phing') . ' ' . implode(' ', $argv);
if (false === system($command, $result) || $result) {
throw new \RuntimeException('Failed to run build script');
}
}
6 changes: 5 additions & 1 deletion bin/builder/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
-Dupdate_versions=false (= true / for CI and automated push)
-->
<project name="gantry5" basedir="." description="Phing Build Script" default="prod">
<taskdef name="jsonmap" classname="JsonMapTask" />
<property name="builder.classes.dir" value="${phing.dir}/classes" />
<path id="project.class.path">
<pathelement path="${builder.classes.dir}" />
</path>
<taskdef name="jsonmap" classname="JsonMapTask" classpathref="project.class.path" />

<!-- Setup of any global settings that will apply to the entire build script -->
<property file="${phing.dir}/build.ini" />
Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@
"bin/composer-install",
"bin/build prod"
]
},
"require-dev": {
"phing/phing": "^3.0"
}
}
Loading
Loading