ReleaseNoteAppService hataların düzeltmesi
This commit is contained in:
parent
0abf181a9c
commit
f949d0ae78
8 changed files with 18 additions and 22 deletions
|
|
@ -2,22 +2,27 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Sürüm notlarını git tag'lerinden üretir:
|
# Sürüm notlarını git tag'lerinden üretir:
|
||||||
# api/src/Sozsoft.Platform.HttpApi.Host/release-notes.json
|
# api/release-notes/release-notes.json
|
||||||
#
|
#
|
||||||
# Bu dosya API imajına gömülür; uygulama açılışında ReleaseNoteStartupService onu
|
# Bu dosya API konteynerine /etc/api/release-notes altına MOUNT edilir (imaja
|
||||||
# `Sas_H_ReleaseNote` tablosuna senkronize eder (yeni tag eklenir, mesajı değişen
|
# GÖMÜLMEZ). Uygulama açılışında ReleaseNoteStartupService onu `Sas_H_ReleaseNote`
|
||||||
# tag güncellenir). Yani YENİ SÜRÜM İÇİN DbMigrator ÇALIŞTIRMAK GEREKMEZ; API'yi
|
# tablosuyla eşitler. Yani yeni bir sürüm tag'i için ne DbMigrator ne de imaj
|
||||||
# deploy etmek yeterlidir. İstemci sürüm numarasını ve changelog'u
|
# derlemesi gerekir; deploy sırasında bu script koşar ve konteyner yeniden
|
||||||
# application-configuration yanıtındaki `extraProperties.changeLogs` alanından okur.
|
# başlar. İstemci sürüm numarasını ve changelog'u application-configuration
|
||||||
|
# yanıtındaki `extraProperties.changeLogs` alanından okur.
|
||||||
#
|
#
|
||||||
# Deploy akışında build/api.sh tarafından otomatik çağrılır; elle de
|
# Kaynak ağacının DIŞINDA bir klasöre yazılmasının sebebi Docker katman cache'i:
|
||||||
# çalıştırılabilir. Git deposu gerektiği için imajın içinde değil, imaj
|
# dosya `src/` altında olsaydı Dockerfile'daki `COPY . .` her tag'de geçersizleşip
|
||||||
# oluşturulmadan ÖNCE build sunucusunda koşar.
|
# tüm `dotnet publish` adımını yeniden çalıştırırdı.
|
||||||
|
#
|
||||||
|
# Deploy akışında deploy/app.sh tarafından otomatik çağrılır; elle de
|
||||||
|
# çalıştırılabilir. Çıktı git'e commit EDİLMEZ (.gitignore).
|
||||||
#
|
#
|
||||||
# Dış bağımlılığı yoktur (jq/node gerekmez): JSON kaçışları sed ile yapılır.
|
# Dış bağımlılığı yoktur (jq/node gerekmez): JSON kaçışları sed ile yapılır.
|
||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
OUTPUT="src/Sozsoft.Platform.HttpApi.Host/release-notes.json"
|
OUTPUT="release-notes/release-notes.json"
|
||||||
|
mkdir -p "$(dirname "$OUTPUT")"
|
||||||
|
|
||||||
if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||||
echo "> git deposu yok, ${OUTPUT} güncellenmedi." >&2
|
echo "> git deposu yok, ${OUTPUT} güncellenmedi." >&2
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ public class ReleaseNoteDto : EntityDto<Guid>
|
||||||
{
|
{
|
||||||
public string Version { get; set; }
|
public string Version { get; set; }
|
||||||
public DateTime ReleaseDate { get; set; }
|
public DateTime ReleaseDate { get; set; }
|
||||||
public string Commit { get; set; }
|
|
||||||
|
|
||||||
/// <summary>Sürüm notu maddeleri (entity'de satır satır saklanır).</summary>
|
/// <summary>Sürüm notu maddeleri (entity'de satır satır saklanır).</summary>
|
||||||
public string[] ChangeLog { get; set; }
|
public string[] ChangeLog { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ public class ReleaseNoteAppService : PlatformAppService
|
||||||
Id = note.Id,
|
Id = note.Id,
|
||||||
Version = note.Version,
|
Version = note.Version,
|
||||||
ReleaseDate = note.ReleaseDate,
|
ReleaseDate = note.ReleaseDate,
|
||||||
Commit = note.Commit,
|
|
||||||
ChangeLog = note.GetChangeLog()
|
ChangeLog = note.GetChangeLog()
|
||||||
})
|
})
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,6 @@ public class PlatformApplicationConfigurationContributor : IApplicationConfigura
|
||||||
context.ApplicationConfiguration.SetProperty("changeLogs", new
|
context.ApplicationConfiguration.SetProperty("changeLogs", new
|
||||||
{
|
{
|
||||||
uiVersion = latest?.Version,
|
uiVersion = latest?.Version,
|
||||||
buildDate = latest?.ReleaseDate.ToString("yyyy-MM-dd"),
|
|
||||||
tags = latest?.GetChangeLog() ?? []
|
tags = latest?.GetChangeLog() ?? []
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ export interface ReleaseNoteDto {
|
||||||
id: string
|
id: string
|
||||||
version: string
|
version: string
|
||||||
releaseDate: string
|
releaseDate: string
|
||||||
commit?: string
|
|
||||||
changeLog: string[]
|
changeLog: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -548,7 +548,6 @@ self.addEventListener('activate', (event) => {
|
||||||
(async () => {
|
(async () => {
|
||||||
await cleanup()
|
await cleanup()
|
||||||
await self.clients.claim()
|
await self.clients.claim()
|
||||||
await broadcast({ type: 'SW_ACTIVATED' })
|
|
||||||
})(),
|
})(),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import AppUpdateDialog from './AppUpdateDialog'
|
||||||
*/
|
*/
|
||||||
let root: Root | undefined
|
let root: Root | undefined
|
||||||
|
|
||||||
export const mountAppUpdateDialog = async () => {
|
export const mountAppUpdateDialog = () => {
|
||||||
if (root) return
|
if (root) return
|
||||||
const host = document.createElement('div')
|
const host = document.createElement('div')
|
||||||
host.id = 'app-update-root'
|
host.id = 'app-update-root'
|
||||||
|
|
@ -17,5 +17,3 @@ export const mountAppUpdateDialog = async () => {
|
||||||
root = createRoot(host)
|
root = createRoot(host)
|
||||||
root.render(<AppUpdateDialog />)
|
root.render(<AppUpdateDialog />)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default mountAppUpdateDialog
|
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,6 @@ export type AppUpdateState = {
|
||||||
export type VersionInfo = {
|
export type VersionInfo = {
|
||||||
/** Uygulamanın (UI) çalışan sürümü. */
|
/** Uygulamanın (UI) çalışan sürümü. */
|
||||||
uiVersion: string
|
uiVersion: string
|
||||||
buildDate?: string
|
|
||||||
/** Son sürümün notları. */
|
/** Son sürümün notları. */
|
||||||
tags?: string[]
|
tags?: string[]
|
||||||
}
|
}
|
||||||
|
|
@ -244,7 +243,7 @@ function recalculate(
|
||||||
* Sürüm bilgisini application-configuration yanıtından alır.
|
* Sürüm bilgisini application-configuration yanıtından alır.
|
||||||
*
|
*
|
||||||
* Store, config'i her yüklediğinde bunu çağırır; ayrı bir sürüm isteği yoktur.
|
* Store, config'i her yüklediğinde bunu çağırır; ayrı bir sürüm isteği yoktur.
|
||||||
* Yük şekli: `extraProperties.changeLogs = { uiVersion, buildDate, tags[] }`.
|
* Yük şekli: `extraProperties.changeLogs = { uiVersion, tags[] }`.
|
||||||
*/
|
*/
|
||||||
export const setAppVersionInfo = (raw: unknown) => {
|
export const setAppVersionInfo = (raw: unknown) => {
|
||||||
const data = raw as Partial<VersionInfo> | undefined
|
const data = raw as Partial<VersionInfo> | undefined
|
||||||
|
|
@ -289,7 +288,6 @@ let initialization: Promise<void> | undefined
|
||||||
let activating = false
|
let activating = false
|
||||||
let reloading = false
|
let reloading = false
|
||||||
let lastCheckAt = 0
|
let lastCheckAt = 0
|
||||||
let lastVersionCheckAt = 0
|
|
||||||
let pollTimer: number | undefined
|
let pollTimer: number | undefined
|
||||||
let activationRetryTimer: number | undefined
|
let activationRetryTimer: number | undefined
|
||||||
let activationTimeoutTimer: number | undefined
|
let activationTimeoutTimer: number | undefined
|
||||||
|
|
@ -623,7 +621,7 @@ async function showUpdateDialog(status: AppUpdateStatus) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { mountAppUpdateDialog } = await import('./mountAppUpdateDialog')
|
const { mountAppUpdateDialog } = await import('./mountAppUpdateDialog')
|
||||||
await mountAppUpdateDialog()
|
mountAppUpdateDialog()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
dialogMountRequested = false
|
dialogMountRequested = false
|
||||||
console.warn('Güncelleme penceresi yüklenemedi.', error)
|
console.warn('Güncelleme penceresi yüklenemedi.', error)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue