ci: expand shared package validation and test coverage
- Add lint, formatting, vet, and publish workflow checks - Run Go database tests with PostgreSQL and add Java tests - Make consumer sync opt-in; update docs and Go dependency
This commit is contained in:
1 parent
937f51b4fb
commit
0ff94f9b10
107 files changed
+10124
-410
No files matched your search
@@ -270,9 +270,19 @@ foreach ($consumerProject in $consumerProjects) {
|
||||
|
||||
$dirtyDestination = @(Invoke-GitText -WorkingDirectory $projectRoot -Arguments @('status', '--porcelain', '--', $destination))
|
||||
$dirtyLegacy = if ($isLegacyEligible) { @(Invoke-GitText -WorkingDirectory $projectRoot -Arguments @('status', '--porcelain', '--', $legacyDirectoryName)) } else { @() }
|
||||
if (($dirtyDestination.Count -gt 0 -or $dirtyLegacy.Count -gt 0) -and -not $Force) {
|
||||
$hasLocalChanges = $dirtyDestination.Count -gt 0 -or $dirtyLegacy.Count -gt 0
|
||||
if ($hasLocalChanges -and -not $Force) {
|
||||
throw "$destination has local changes. Commit them or rerun with -Force."
|
||||
}
|
||||
if ($hasLocalChanges) {
|
||||
# -Force replaces the snapshot, so keep a copy of what it replaces first.
|
||||
$backupRoot = Join-Path ([IO.Path]::GetTempPath()) ('shared-sync-backup-' + [Guid]::NewGuid().ToString('N'))
|
||||
New-Item -ItemType Directory -Force -Path $backupRoot | Out-Null
|
||||
foreach ($existingEntry in @($destinationEntry, $legacyEntry) | Where-Object { $null -ne $_ }) {
|
||||
Copy-Item -LiteralPath $existingEntry.FullName -Destination (Join-Path $backupRoot $existingEntry.Name) -Recurse -Force
|
||||
}
|
||||
Write-Host " Backed up the local $destination changes in $relativeProject to $backupRoot before overwriting."
|
||||
}
|
||||
|
||||
if ($null -ne $legacyEntry) {
|
||||
$temporaryRenamePath = Join-Path $projectRoot ('.shared-sync-rename-' + [Guid]::NewGuid().ToString('N'))
|
||||
|
||||
Reference in new issue
Block a user