Skip to content

Commit

Permalink
Make snapshot update workflow also update cf_game_version
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Nov 25, 2024
1 parent bdf0a03 commit 9c3f2e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/auto_snapshot_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ on:
fapi_version:
description: "Fabric API version"
required: true
cf_game_version:
description: "CurseForge GameVersion"
required: true

permissions:
contents: write
Expand Down Expand Up @@ -81,7 +84,7 @@ jobs:

- name: Update version constants
run: |
python scripts/update_version_constants.py "${{ github.event.inputs.mc_version }}" "${{ github.event.inputs.yarn_mappings }}" "${{ github.event.inputs.fabric_loader }}" "${{ github.event.inputs.fapi_version }}"
python scripts/update_version_constants.py "${{ github.event.inputs.mc_version }}" "${{ github.event.inputs.yarn_mappings }}" "${{ github.event.inputs.fabric_loader }}" "${{ github.event.inputs.fapi_version }}" "${{ github.event.inputs.cf_game_version }}"
shell: bash

# To fix any style issues that the migration scripts might cause
Expand Down
2 changes: 2 additions & 0 deletions scripts/update_version_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
parser.add_argument("yarn_mappings", help="Yarn mappings version")
parser.add_argument("fabric_loader", help="Fabric Loader version")
parser.add_argument("fapi_version", help="Fabric API version")
parser.add_argument("cf_game_version", help="CurseForge GameVersion")
args = parser.parse_args()

# Read gradle.properties
Expand All @@ -20,6 +21,7 @@
"loader_version": lambda v: args.fabric_loader,
"fabric_version": lambda v: args.fapi_version,
"mod_version": lambda v: v[: v.index("MC") + 2] + args.mc_version,
"cf_game_version": lambda v: args.cf_game_version,
}

# Update lines
Expand Down

0 comments on commit 9c3f2e8

Please sign in to comment.