diff --git a/.releaserc.json b/.releaserc.json index f0773bf10ef616fd63bfdf7f46f48a2f4c3bbb26..6507490fcf6ff788032b2880f3141a4c18abd13c 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -19,6 +19,7 @@ "@semantic-release/git", { "assets": [ + "app/Config/Constants.php", "composer.json", "package.json", "package-lock.json", diff --git a/app/Config/Constants.php b/app/Config/Constants.php index f890af0e9feaf89b890673b6a33e25864647ee9b..c5ab4b2a91db1f40fcd94a780ec5ed5cfaf0109c 100644 --- a/app/Config/Constants.php +++ b/app/Config/Constants.php @@ -1,5 +1,14 @@ <?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 //-------------------------------------------------------------------- diff --git a/app/Views/admin/_layout.php b/app/Views/admin/_layout.php index cc46a59136bec4cd44c494e9f0432ea95e0c3fab..6a8d1706679c353851225363792b033cecdfd09b 100644 --- a/app/Views/admin/_layout.php +++ b/app/Views/admin/_layout.php @@ -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" diff --git a/prepare-release.sh b/prepare-release.sh index f81598f6ff31f75677ff35276eadbc17471e4c59..93d53ae77dd2e7383c892c18636fa445381de504 100644 --- a/prepare-release.sh +++ b/prepare-release.sh @@ -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/