maradotwebp / pax

📦 The MC modpack manager for professionals.
https://github.com/froehlichA/pax/releases/latest
MIT License
161 stars 4 forks source link

Can't use custom .out folder or export name, or change pack versions #50

Closed Beethoven-n closed 3 years ago

Beethoven-n commented 3 years ago

i'd love to be able to do pax export ./builds/Fabric-Skies-1.4.0.zip to export to a custom location and a custom file. also an argument to set a pack version, rather than just MC or loader versions

maradotwebp commented 3 years ago

i'd love to be able to do pax export ./builds/Fabric-Skies-1.4.0.zip to export to a custom location and a custom file.

No worries, I'll implement that.

also an argument to set the pack version

I'm not sure a command is needed for this: You can change the version manually in the manifest.json. The ./pax version command only exists because the loader version needs to be updated when switching between minecraft versions.

Beethoven-n commented 3 years ago

ahh, it'd just be nice to have a version appended to every export on top of the name since i keep track of pack versions too

maradotwebp commented 3 years ago

You can now export to a custom path in the latest release, like this: ./pax export ./builds/Fabric-Skies-1.4.0.zip.


If you want to automatically get the output zip name based on your current modpack version, you can use:

./pax export "./builds/Fabric-Skies-$(cat modpack/manifest.json | jq -r '.version').zip"

(Assuming you're running this either on Linux or on a CI.)

Beethoven-n commented 3 years ago

You can now export to a custom path in the latest release, like this: ./pax export ./builds/Fabric-Skies-1.4.0.zip.

If you want to automatically get the output zip name based on your current modpack version, you can use:

./pax export "./builds/Fabric-Skies-$(cat modpack/manifest.json | jq -r '.version').zip"

(Assuming you're running this either on Linux or on a CI.)

just so you know, you don't have to cat into jq, jq already gets the contents of that file jq -r '.version' is good enough in that. probably gonna just put this in my shell rc, pardon space indentation

paxex() {
  pax export "builds/`jq -r '.name'`-`jq -r '.version'`.zip"
}