Skip to content
Snippets Groups Projects
Commit 9f2574e6 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

feat: display castopod version in admin footer

add CP_VERSION constant in app/Config/Constants.php that updates upon release through
prepare-release.sh script

closes #68
parent 6b36a801
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,7 @@
"@semantic-release/git",
{
"assets": [
"app/Config/Constants.php",
"composer.json",
"package.json",
"package-lock.json",
......
<?php
//--------------------------------------------------------------------------
// Castopod Version
//--------------------------------------------------------------------------
// The Castopod version number to display.
//
// NOTE: this constant is updated upon release with Continuous Integration.
//
defined('CP_VERSION') || define('CP_VERSION', '1.0.0-alpha.8');
//--------------------------------------------------------------------
// App Namespace
//--------------------------------------------------------------------
......
......@@ -41,10 +41,11 @@
</div>
</main>
<footer class="px-2 py-2 mx-auto text-xs text-right holy-grail-footer">
<small><?= lang('Common.powered_by', [
<?= lang('Common.powered_by', [
'castopod' =>
'<a class="underline hover:no-underline" href="https://castopod.org/" target="_blank" rel="noreferrer noopener">Castopod</a>',
]) ?></small>
'<a class="underline hover:no-underline" href="https://castopod.org/" target="_blank" rel="noreferrer noopener">Castopod</a> v' .
CP_VERSION,
]) ?>
</footer>
<button
type="button"
......
......@@ -6,6 +6,9 @@ COMPOSER_VERSION=$(echo "$VERSION" | perl -pe 's/(?<=[alpha|beta])\.//g')
# replace composer.json version using jq
echo "$( jq '.version = "'$COMPOSER_VERSION'"' composer.json )" > composer.json
# replace CP_VERSION constant in app/config/constants
sed -i "s/^defined('CP_VERSION').*/defined('CP_VERSION') || define('CP_VERSION', '$VERSION');/" ./app/Config/Constants.php
# download GeoLite2-City archive and extract it to writable/uploads
wget -c "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=v3PguJMcmZMb9Ld0&suffix=tar.gz" -O - | tar -xz -C ./writable/uploads/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment