Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6f9dc87d7b1c
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 42cf969436e4
Choose a head ref
  • 4 commits
  • 2 files changed
  • 2 contributors

Commits on Jun 29, 2019

  1. Copy the full SHA
    957147f View commit details
  2. documentation

    eggrobin committed Jun 29, 2019

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    0a574a0 View commit details
  3. contains

    eggrobin committed Jun 29, 2019
    Copy the full SHA
    98cd006 View commit details
  4. Merge pull request #2230 from eggrobin/improve-releasing

    Improve the release process
    pleroy authored Jun 29, 2019
    Copy the full SHA
    42cf969 View commit details
Showing with 24 additions and 9 deletions.
  1. +3 −4 documentation/Releasing.md
  2. +21 −5 make_principia_release.ps1
7 changes: 3 additions & 4 deletions documentation/Releasing.md
Original file line number Diff line number Diff line change
@@ -6,16 +6,15 @@ We assume the remote corresponding to https://github.com/mockingbirdnest/Princip
is called `la-vache`. `<Mathematician>` and `<mathematician>` stand for the version
names with the appropriate cases.
- [ ] Make sure that the fingerprints for detecting and fixing the stock system are up-to-date.
- [ ] If using profile-guided optimization (PGO), make sure that the `PlayerTest.Benchmark` test contains the latest journal file name and has been merged as the last pull request.
- [ ] Check that the release name, release date, and lunation number for the following update, used by the update reminder, are correctly set in the adapter.
- [ ] Check that the release name, release date, and lunation number for the following update, used by the update reminder, are correctly set in the main window.
- [ ] Make sure that the project can be built and tested under Linux.
- [ ] Run the following command, where:
- `yyyyMMddHH` is the date of the new moon in UT1,
- `<language>` is the language code for the language in which `<Mathematician>` is written,
- `1.x.y` is the primary KSP version (the latest version targeted by the `Release` configuration), and
- `"1.u.v", ...` is the (possibly empty) comma-separated list of supported KSP versions that require a separate build, where each version number is quoted.
- `"1.u.v"` is the (possibly empty) comma-separated list of supported KSP versions that require a separate build, where each version number is quoted.
```powershell
make_principia_release "<Mathematician>" "<language>" "yyyyMMddHH" "1.x.y" @("1.u.v", ...)
.\make_principia_release "<Mathematician>" "<language>" "yyyyMMddHH" "1.x.y" @("1.u.v")
```
This creates `<root>\principia <mathematician> for 1.x.y.zip`, as well as `<root>\principia <mathematician> for 1.u.v.zip` as appropriate.
- [ ] Go to a Linux machine and checkout the newly created tag:
26 changes: 21 additions & 5 deletions make_principia_release.ps1
Original file line number Diff line number Diff line change
@@ -29,7 +29,10 @@ if (!($date -match '^\d{10}$')) {
}

$msbuild = &".\find_msbuild.ps1"
$7zip = "${Env:ProgramFiles}\7-Zip\7z.exe"
$7zip = "${Env:ProgramW6432}\7-Zip\7z.exe"
if (!(test-path -path $7zip)) {
write-error ("Could not find 7-Zip.")
}

$tag = "$date-$mathematician"

@@ -45,10 +48,9 @@ if ($tag -in $(git tag)) {

git checkout "$remote/master"
git tag $tag -m $mathematician
git push $remote --tags

if (test-path .\Release) {
rm .\Release -recurse
rm .\Release -recurse -force
}

&$msbuild `
@@ -74,13 +76,19 @@ foreach ($ksp_version in $compatibility_ksp_versions) {
# Sanity check: the error message in the adapter should mention all supported
# versions.

if (!(sls ([regex]::escape($primary_ksp_version)) -encoding Unicode `
if (!(sls ([regex]::escape(
[text.encoding]::ascii.getstring(
[text.encoding]::unicode.getbytes(
$ksp_version)))) -encoding ASCII `
".\Release\GameData\Principia\ksp_plugin_adapter.dll")) {
write-error ("Configuration Release does not target $primary_ksp_version.")
}

foreach ($ksp_version in $compatibility_ksp_versions) {
if (!(sls ([regex]::escape($ksp_version)) -encoding Unicode `
if (!(sls ([regex]::escape(
[text.encoding]::ascii.getstring(
[text.encoding]::unicode.getbytes(
$ksp_version)))) -encoding ASCII `
(".\Release\$ksp_version Compatibility\GameData\Principia\" +
"ksp_plugin_adapter.dll"))) {
write-error ("Configuration Release KSP $ksp_version does not target " +
@@ -99,3 +107,11 @@ foreach ($ksp_version in $compatibility_ksp_versions) {
&$7zip a "principia $lowercase_mathematician for $ksp_version.zip" `
".\Release\$ksp_version Compatibility\GameData"
}

if ($mathematician.contains("TEST")) {
echo "Successfully built test release $tag. Run"
echo " git tag --delete $tag"
echo "to clean up."
} else {
git push $remote --tags
}