Skip to content

Commit

Permalink
doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
guirava committed Oct 13, 2024
1 parent 698c49a commit 0ea10a4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
17 changes: 9 additions & 8 deletions Utils/admin/HOWTO_MAKE_A_RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ released, and that it matches the latest entry in `CHANGELOG.md`.
```

If the version is not set on the package, or if it is not the same as the
latest entry in `CHANGELOG.md`, you need push a new commit to the `devel`
latest entry in `CHANGELOG.md`, you need to push a new commit to the `devel`
branch with the updated version:

```powershell
Expand All @@ -49,13 +49,16 @@ git push

### 3. Create a new release

First do a dry run to see what will be released:
We first do a dry run to see if any error occurs during build, tests, packaging,
and commiting to the `main` branch.

```powershell
.\Utils\admin\New-RscSdkRelease.ps1
PS> .\Utils\admin\New-RscSdkRelease.ps1
...
Dry run completed. Local changes were not pushed to the remote repository.
```

If everything looks good, run the script again with the `-NotDryRun` switch:
If no error occured, run the script again with the `-NotDry` switch:

```powershell
.\Utils\admin\New-RscSdkRelease.ps1 -NotDry
Expand All @@ -76,7 +79,5 @@ Line |

Part of the release process is to clean up build and output directories,
if you're on Windows and you get this error, it's likely because you have
a PowerShell session or an IDE that is using files that the script is
trying to clean up. Other OSes handle this better, but on Windows you
need to close your IDEs, your explorer windows, your PowerShell sessions,
and start a new one and start over...
a PowerShell session or an IDE holding files that the script is
trying to clean up. Close everything and start a new `pwsh.exe` session.
14 changes: 11 additions & 3 deletions Utils/admin/New-RscSdkRelease.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ if ($script:NotDry) {
.\Utils\admin\Publish-RscSdk.ps1
}

# Clean up published artifacts
Remove-Item -Recurse .\Output.Publish\ -Force -ErrorAction SilentlyContinue
git restore .

# Pop back
git checkout $sourceBranch

# Prepare devel branch for further development
Expand All @@ -94,6 +99,9 @@ RunIfNotDry {
}
}

Write-Host "Done." -ForegroundColor Green
Write-Host "git status:"
git status
if ($script:NotDry) {
$DoneMessage = "GitHub Release $versionTag created and published to the PowerShell Gallery."
} else {
$DoneMessage = "Dry run completed. Local changes were not pushed to the remote repository."
}
Write-Host $DoneMessage -ForegroundColor Green

0 comments on commit 0ea10a4

Please sign in to comment.