Skip to content

Commit

Permalink
Merge branch '1.20.2' of D:\Repos\Minecraft\SFM\repos\SuperFactoryMan…
Browse files Browse the repository at this point in the history
…ager 1.20.2 into 1.20.3
  • Loading branch information
TeamDman committed Apr 20, 2024
2 parents 30fcc6c + 5ce5bd0 commit ffc1b9f
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 38 deletions.
79 changes: 48 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,37 +35,54 @@ for syntax highlighting 🌈

The following process is designed to catch the most obvious problems that may arise from creating a new release.

```
versions = [1.19.2, 1.19.4, 1.20, 1.20.1]
jars = []
for i,version in enumerate(versions):
git checkout $version
gradle genIntellijRuns
if i == 0:
make changes
bump mod_version in gradle.properties
update changelog.sfml example
git commit
git push
else:
git merge $versions[i-1]
resolve conflicts
runData
git add src/generated
rm -rf runGameTest/world
gradle runGameTestServer, assert exit == 0
gradle build | jars.append($_)
git push --all
for jar in jars:
copy jar to server, run.bat
copy jar to prism launcher, launch
connect to server
assemble a simple program, assert works
for jar in jars:
upload jar to curseforge with changelog
```pwsh
.\act.ps1
Manual: Bump `mod_version` in gradle.properties
Manual: Commit bump
Action: Propagate changes
Action: Run gameTestServer for all versions
Action: Build
Action: Wipe jars summary dir
Action: Collect jars
Action: Update PrismMC test instances to use latest build output
Action: Update test servers to latest build output
Action: Launch PrismMC
Action: Launch test server
for each version:
Launch version from PrismMC
Multiplayer -> join localhost
Break previous setup
Build new setup from scratch -- ensure core gameplay loop is always tested
Validate changelog accuracy
/stop
Quit game
For each version:
CurseForge -> Upload file
"https://authors.curseforge.com/#/projects/306935/files/create"
Environment=Server+Client
Modloader=match mc version {
..1.20 -> Forge
1.20.1 -> Forge+NeoForge
1.20.2.. -> NeoForge
}
Java=Java 17
Minecraft=$version
Changelog= <<
```
$section from changelog.sfml
```
>>
For each version:
Modrinth -> Versions -> Drag n drop
"https://modrinth.com/mod/super-factory-manager/versions"
Adjust populated version numbers
Changelog=same as above
Action: Tag
Action: Push all
```

## Optimization
Expand Down
29 changes: 24 additions & 5 deletions actions/Collect jars.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,39 @@ try {
# Get to repos folder
$cwd = Get-Location
$expected = "D:\repos\Minecraft\SFM\repos"
if (-not $cwd -eq $expected) {
Write-Host $cwd
if (-not $cwd.Path -eq $expected) {
Write-Host $cwd.Path
throw "This should be ran from a directory that is a child of D:\repos\Minecraft\SFM"
}

# Collect jars
Write-Host "Collecting jars"
$outdir = "..\jars"
New-Item -ItemType Directory -Path $outdir -ErrorAction SilentlyContinue

# Fetch all jar files in the build/libs directories
$jars = Get-ChildItem -Recurse | Where-Object { $_ -like "*build\libs\*.jar" }
$jars | ForEach-Object {
Copy-Item -Path $_.FullName -Destination $outdir

# Sort and filter jars by semantic version
$sortedJars = $jars | ForEach-Object {
$nameParts = $_.Name -split '-'
[PSCustomObject]@{
FullPath = $_.FullName
Major = $nameParts[1]
Minor = [int]($nameParts[2].Split('.')[1])
Patch = $nameParts[3]
}
} | Sort-Object -Property Major, Minor -Descending | Group-Object -Property Major | ForEach-Object {
$_.Group | Sort-Object -Property Minor, Patch -Descending | Select-Object -First 1
}

# Copy selected jars to the output directory
$sortedJars | ForEach-Object {
Copy-Item -Path $_.FullPath -Destination $outdir
}

# Open output directory
Invoke-Item $outdir
} finally {
Pop-Location
}
}
5 changes: 5 additions & 0 deletions actions/Wipe jars summary dir.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Get-ChildItem -File ..\..\jars `
| ForEach-Object {
Write-Host "Removing $_"
$_ | Remove-Item
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ private static ChatFormatting getColour(Token token) {
case SFMLLexer.FROM:
case SFMLLexer.TO:
case SFMLLexer.OUTPUT:
case SFMLLexer.FORGET:
return ChatFormatting.LIGHT_PURPLE;
case SFMLLexer.NAME:
case SFMLLexer.EVERY:
Expand All @@ -101,6 +100,7 @@ private static ChatFormatting getColour(Token token) {
case SFMLLexer.TRUE:
case SFMLLexer.FALSE:
case SFMLLexer.NOT:
case SFMLLexer.FORGET:
return ChatFormatting.BLUE;
case SFMLLexer.IDENTIFIER:
case SFMLLexer.STRING:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
-- Official SFM Discord:
-- https://discord.gg/5mbUY3mu6m

---- next ----
-- fix missing dash in changelog
-- make FORGET keyword blue
-- Add git tag action to release process documentation

NAME "Changelog for 4.15.1"
---- 4.15.1 ---
---- 4.15.1 ----
-- Fix crash bug where variable-size inventories (composters) crashed
-- Fix modloader=forge missing for the mc=1.20.1 CurseForge uploads

---- 4.15.0 ----
-- alias "each" to "every" when parsing set operators
Expand Down

0 comments on commit ffc1b9f

Please sign in to comment.