Skip to content

Commit fa1f498

Browse files
⚙️ [Maintenance]: Update super-linter to v8.4.0 (#63)
## Description Updates super-linter from v8.3.2 to v8.4.0. ## Changes - Updated `super-linter/super-linter` to v8.4.0 (`12562e48d7059cf666c43a4ecb0d3b5a2b31bd9e`) - Added `.codespellrc` configuration file for codespell linter ## References - [super-linter v8.4.0 release](https://github.com/super-linter/super-linter/releases/tag/v8.4.0)
1 parent b8d4967 commit fa1f498

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

.github/linters/.codespellrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[codespell]
2+
skip = ./.github/linters

.github/workflows/Linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
persist-credentials: false
2626

2727
- name: Lint code base
28-
uses: super-linter/super-linter@d5b0a2ab116623730dd094f15ddc1b6b25bf7b99 # v8.3.2
28+
uses: super-linter/super-linter@12562e48d7059cf666c43a4ecb0d3b5a2b31bd9e # v8.4.0
2929
env:
3030
GITHUB_TOKEN: ${{ github.token }}
3131
VALIDATE_BIOME_FORMAT: false

src/init.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,21 +148,21 @@ LogGroup 'Determine release configuration' {
148148
$shouldPublish = $false
149149
}
150150

151-
# Determine version bump type from labels (only when publishing)
151+
# Determine version bump type from labels (when publishing or in WhatIf mode to show what would happen)
152152
$majorRelease = $false
153153
$minorRelease = $false
154154
$patchRelease = $false
155155
$hasVersionBump = $false
156156

157-
if ($shouldPublish) {
157+
if ($shouldPublish -or $whatIf) {
158158
$majorRelease = ($labels | Where-Object { $majorLabels -contains $_ }).Count -gt 0
159159
$minorRelease = ($labels | Where-Object { $minorLabels -contains $_ }).Count -gt 0 -and -not $majorRelease
160160
$patchRelease = (
161161
($labels | Where-Object { $patchLabels -contains $_ }
162162
).Count -gt 0 -or $autoPatching) -and -not $majorRelease -and -not $minorRelease
163163

164164
$hasVersionBump = $majorRelease -or $minorRelease -or $patchRelease
165-
if (-not $hasVersionBump) {
165+
if (-not $hasVersionBump -and $shouldPublish) {
166166
Write-Host 'No version bump label found and AutoPatching is disabled. Skipping publish.'
167167
$shouldPublish = $false
168168
}
@@ -190,8 +190,8 @@ $newVersion = $null
190190
$releases = @()
191191
$prereleaseTagsToCleanup = ''
192192

193-
# Fetch releases if publishing OR if cleanup is enabled (cleanup can work independently)
194-
if ($shouldPublish -or $autoCleanup) {
193+
# Fetch releases if publishing OR if cleanup is enabled OR WhatIf mode (to show what would happen)
194+
if ($shouldPublish -or $autoCleanup -or $whatIf) {
195195
#region Get releases
196196
LogGroup 'Get all releases - GitHub' {
197197
$releases = gh release list --json 'createdAt,isDraft,isLatest,isPrerelease,name,publishedAt,tagName' | ConvertFrom-Json
@@ -206,8 +206,8 @@ if ($shouldPublish -or $autoCleanup) {
206206
#endregion Get releases
207207
}
208208

209-
# Version calculation is only needed when publishing
210-
if ($shouldPublish) {
209+
# Version calculation is needed when publishing OR in WhatIf mode (to show what would be created)
210+
if ($shouldPublish -or $whatIf) {
211211
#region Get versions
212212
LogGroup 'Get latest version - GitHub' {
213213
$latestRelease = $releases | Where-Object { $_.isLatest -eq $true }

src/publish.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ LogGroup 'Load inputs' {
3737
}
3838

3939
LogGroup 'Load publish context from environment' {
40+
$shouldPublish = $env:PUBLISH_CONTEXT_ShouldPublish -eq 'true'
4041
$createRelease = $env:PUBLISH_CONTEXT_CreateRelease -eq 'true'
4142
$createPrerelease = $env:PUBLISH_CONTEXT_CreatePrerelease -eq 'true'
4243
$newVersionString = $env:PUBLISH_CONTEXT_NewVersion
@@ -56,6 +57,7 @@ LogGroup 'Load publish context from environment' {
5657

5758
Write-Host '-------------------------------------------------'
5859
[PSCustomObject]@{
60+
ShouldPublish = $shouldPublish
5961
CreateRelease = $createRelease
6062
CreatePrerelease = $createPrerelease
6163
NewVersion = $newVersion.ToString()

0 commit comments

Comments
 (0)