Compare commits
10 Commits
309c68d3fd
...
#172-app-f
Author | SHA1 | Date | |
---|---|---|---|
0e741ea1b0
|
|||
d4cc6691e6
|
|||
8ac9df56f7
|
|||
552677bdb4
|
|||
0f69b342ec
|
|||
6d6470c3bd
|
|||
c16943b623
|
|||
f2c978d99b
|
|||
2062868376
|
|||
0d26af30b0
|
6
.env.ci
6
.env.ci
@@ -21,3 +21,9 @@ SESSION_DRIVER=array
|
|||||||
SESSION_LIFETIME=120
|
SESSION_LIFETIME=120
|
||||||
FILESYSTEM_DISK=local
|
FILESYSTEM_DISK=local
|
||||||
MAIL_MAILER=array
|
MAIL_MAILER=array
|
||||||
|
|
||||||
|
HEROKU_RELEASE_VERSION=v01
|
||||||
|
HEROKU_SLUG_DESCRIPTION="Dev 643f546"
|
||||||
|
HEROKU_RELEASE_CREATED_AT=2022-07-04T18:05:46Z
|
||||||
|
HEROKU_SLUG_COMMIT=643f546142b8a2db342f0ae46f01e61dce03e97c
|
||||||
|
GITHUB_REPO_URL=https://github.com/blumilksoftware/toby/
|
||||||
|
@@ -6,7 +6,6 @@ namespace Toby\Infrastructure\Http\Middleware;
|
|||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Carbon;
|
|
||||||
use Inertia\Middleware;
|
use Inertia\Middleware;
|
||||||
use Toby\Domain\VacationRequestStatesRetriever;
|
use Toby\Domain\VacationRequestStatesRetriever;
|
||||||
use Toby\Eloquent\Helpers\YearPeriodRetriever;
|
use Toby\Eloquent\Helpers\YearPeriodRetriever;
|
||||||
@@ -74,16 +73,14 @@ class HandleInertiaRequests extends Middleware
|
|||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getDeployInformation(): array
|
protected function getDeployInformation(): Closure
|
||||||
{
|
{
|
||||||
$releaseDate = config("heroku.release_created_at");
|
return fn(): array => [
|
||||||
|
|
||||||
return [
|
|
||||||
"release_version" => config("heroku.release_version"),
|
"release_version" => config("heroku.release_version"),
|
||||||
"slug_description" => config("heroku.slug_description"),
|
"slug_description" => config("heroku.slug_description"),
|
||||||
"release_created_at" => $releaseDate ? Carbon::parse($releaseDate)->format('Y-m-d H:i:s') : null,
|
"release_created_at" => config("heroku.release_created_at"),
|
||||||
"slug_commit" => config("heroku.slug_commit"),
|
"slug_commit" => config("heroku.slug_commit"),
|
||||||
"github_url" => preg_replace("/\/$/i", "", config("heroku.github_url", "")),
|
"github_url" => config("heroku.github_url", ""),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -7,5 +7,5 @@ return [
|
|||||||
"slug_description" => env("HEROKU_SLUG_DESCRIPTION"),
|
"slug_description" => env("HEROKU_SLUG_DESCRIPTION"),
|
||||||
"release_created_at" => env("HEROKU_RELEASE_CREATED_AT"),
|
"release_created_at" => env("HEROKU_RELEASE_CREATED_AT"),
|
||||||
"slug_commit" => env("HEROKU_SLUG_COMMIT"),
|
"slug_commit" => env("HEROKU_SLUG_COMMIT"),
|
||||||
"github_url" => env("GITHUB_REPO_URL")
|
"github_url" => env("GITHUB_REPO_URL"),
|
||||||
];
|
];
|
||||||
|
@@ -32,5 +32,10 @@
|
|||||||
<env name="QUEUE_CONNECTION" value="sync"/>
|
<env name="QUEUE_CONNECTION" value="sync"/>
|
||||||
<env name="SESSION_DRIVER" value="array"/>
|
<env name="SESSION_DRIVER" value="array"/>
|
||||||
<env name="TELESCOPE_ENABLED" value="false"/>
|
<env name="TELESCOPE_ENABLED" value="false"/>
|
||||||
|
<env name="HEROKU_RELEASE_VERSION" value="v01"/>
|
||||||
|
<env name="HEROKU_SLUG_DESCRIPTION" value="Dev 643f546"/>
|
||||||
|
<env name="HEROKU_RELEASE_CREATED_AT" value="2022-07-04T18:05:46Z"/>
|
||||||
|
<env name="HEROKU_SLUG_COMMIT" value="643f546142b8a2db342f0ae46f01e61dce03e97c"/>
|
||||||
|
<env name="GITHUB_REPO_URL" value="https://github.com/blumilksoftware/toby"/>
|
||||||
</php>
|
</php>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
55
resources/js/Shared/DeployInfo.vue
Normal file
55
resources/js/Shared/DeployInfo.vue
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="min-w-full p-4 text-xs text-gray-500 flex flex-row gap-x-1"
|
||||||
|
>
|
||||||
|
<p class="flex flex-col sm:flex-row gap-x-1">
|
||||||
|
<span class="font-bold whitespace-nowrap">Wersja:</span>
|
||||||
|
<span
|
||||||
|
class="whitespace-nowrap"
|
||||||
|
:title="`Commit: ${deployInformation.slug_commit ?? 'unset'}`"
|
||||||
|
>
|
||||||
|
{{ deployInformation.slug_description ?? 'unset' }} ({{ deployInformation.release_version ?? 'unset' }})
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<p
|
||||||
|
v-if="deployInformation.release_created_at"
|
||||||
|
class="flex flex-col sm:flex-row gap-x-1 border-l-2 border-gray-300 pl-1"
|
||||||
|
>
|
||||||
|
<span class="font-bold whitespace-nowrap">Ostatnio zbudowano:</span>
|
||||||
|
<span>{{ getDate() }}</span>
|
||||||
|
</p>
|
||||||
|
<p
|
||||||
|
v-if="deployInformation.github_url"
|
||||||
|
class="flex flex-col sm:flex-row gap-x-1 border-l-2 border-gray-300 pl-1"
|
||||||
|
>
|
||||||
|
<span class="hidden sm:block font-bold whitespace-nowrap">Repozytorium:</span>
|
||||||
|
<span class="block sm:hidden font-bold whitespace-nowrap">Repo:</span>
|
||||||
|
<a
|
||||||
|
v-if="deployInformation.github_url"
|
||||||
|
class="text-gray-800 whitespace-nowrap underline hover:no-underline hover:text-blumilk-600"
|
||||||
|
:href="deployInformation.github_url"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener nofollow noreferrer"
|
||||||
|
>GitHub</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { DateTime } from 'luxon'
|
||||||
|
|
||||||
|
let props = defineProps({
|
||||||
|
deployInformation: Object,
|
||||||
|
})
|
||||||
|
|
||||||
|
function getDate() {
|
||||||
|
return DateTime.fromISO(props.deployInformation.release_created_at)
|
||||||
|
.toLocaleString({
|
||||||
|
year: 'numeric',
|
||||||
|
month: '2-digit',
|
||||||
|
day: '2-digit',
|
||||||
|
hour: '2-digit',
|
||||||
|
minute: '2-digit',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="min-h-full">
|
<div class="relative min-h-screen">
|
||||||
<MainMenu
|
<MainMenu
|
||||||
:auth="auth"
|
:auth="auth"
|
||||||
:years="years"
|
:years="years"
|
||||||
@@ -9,31 +9,12 @@
|
|||||||
<div class="lg:px-4">
|
<div class="lg:px-4">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
<div class="p-4 text-xs text-gray-500 flex align-baseline gap-x-1">
|
<div class="h-8 sm:h-4"></div>
|
||||||
<p>
|
|
||||||
<strong>Wydanie:</strong> <a
|
|
||||||
v-if="deployInformation.github_url"
|
|
||||||
:href="`${deployInformation.github_url}/commit/${deployInformation.slug_commit}`"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener nofollow noreferrer"
|
|
||||||
:title="`Commit: ${deployInformation.slug_commit}`"
|
|
||||||
>
|
|
||||||
{{ deployInformation.slug_description }} ({{ deployInformation.release_version }})
|
|
||||||
</a><span
|
|
||||||
v-else
|
|
||||||
:title="`Commit: ${deployInformation.slug_commit}`"
|
|
||||||
>
|
|
||||||
{{ deployInformation.slug_description }}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<p
|
|
||||||
v-if="deployInformation.release_created_at"
|
|
||||||
class="border-l-2 border-gray-300 pl-1"
|
|
||||||
>
|
|
||||||
<strong>Data wydania:</strong> {{ deployInformation.release_created_at }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
|
<DeployInfo
|
||||||
|
:deploy-information="deployInformation"
|
||||||
|
class="absolute bottom-0 justify-end"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -41,6 +22,7 @@
|
|||||||
import MainMenu from '@/Shared/MainMenu'
|
import MainMenu from '@/Shared/MainMenu'
|
||||||
import { useToast } from 'vue-toastification'
|
import { useToast } from 'vue-toastification'
|
||||||
import { watch } from 'vue'
|
import { watch } from 'vue'
|
||||||
|
import DeployInfo from '@/Shared/DeployInfo'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
flash: Object,
|
flash: Object,
|
||||||
|
@@ -1,31 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="relative flex flex-col justify-center py-12 min-h-screen bg-blumilk-25 sm:px-6 lg:px-8">
|
<div class="relative flex flex-col justify-center py-12 min-h-screen bg-blumilk-25 sm:px-6 lg:px-8">
|
||||||
<slot />
|
<slot />
|
||||||
<div class="absolute left-0 bottom-0 min-w-full p-4 text-xs text-gray-500 flex flex-col gap-x-1">
|
<DeployInfo
|
||||||
<p>
|
:deploy-information="deployInformation"
|
||||||
<strong>Wydanie:</strong> <a
|
class="absolute left-0 bottom-0 justify-end"
|
||||||
v-if="deployInformation.github_url"
|
/>
|
||||||
:href="`${deployInformation.github_url}/commit/${deployInformation.slug_commit}`"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener nofollow noreferrer"
|
|
||||||
:title="`Commit: ${deployInformation.slug_commit}`"
|
|
||||||
>
|
|
||||||
{{ deployInformation.slug_description }} ({{ deployInformation.release_version }})
|
|
||||||
</a>
|
|
||||||
<span
|
|
||||||
v-else
|
|
||||||
:title="`Commit: ${deployInformation.slug_commit}`"
|
|
||||||
>
|
|
||||||
{{ deployInformation.slug_description }}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<p v-if="deployInformation.release_created_at">
|
|
||||||
<strong>Data wydania:</strong> {{ deployInformation.release_created_at }}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import DeployInfo from '@/Shared/DeployInfo'
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
deployInformation: Object,
|
deployInformation: Object,
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user