27 lines
1.3 KiB
Bash
Executable File
27 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Reproduce the two disposable source variants used in Phase 0.
|
|
# Exports artifacts only; never changes runtime or starts Docker.
|
|
set -euo pipefail
|
|
task_root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." && pwd)
|
|
task_dir="$task_root/.tools/repro-fabric-variants"
|
|
mkdir "$task_dir"
|
|
cp -a "$task_root/examples/fabric-spike/pack" "$task_dir/update-pack"
|
|
cp -a "$task_root/examples/fabric-spike/pack" "$task_dir/loader-only-pack"
|
|
task_packwiz=("$task_root/.tools/packwiz/packwiz" --cache "$task_root/.tools/packwiz/cache" --config "$task_root/.tools/packwiz/config.toml")
|
|
cd "$task_dir/update-pack"
|
|
sed -i 's/^version = "0.0.1"$/version = "0.0.2"/' pack.toml
|
|
printf 'pack-default-v2\n' > config/spike-marker.txt
|
|
mkdir -p world/datapacks
|
|
cp -a "$task_root/testdata/spike-datapack" world/datapacks/phase0
|
|
"${task_packwiz[@]}" modrinth add --project-id P7dR8mSH --version-id fpB2VatZ -y
|
|
"${task_packwiz[@]}" refresh
|
|
"$task_root/scripts/spike-build.sh" "$PWD"
|
|
cd "$task_dir/loader-only-pack"
|
|
sed -i 's/^version = "0.0.1"$/version = "0.0.3"/' pack.toml
|
|
printf 'loader-only-v3\n' > config/spike-marker.txt
|
|
"${task_packwiz[@]}" remove modmenu -y
|
|
"${task_packwiz[@]}" remove placeholder-api -y
|
|
"${task_packwiz[@]}" remove fabric-api -y
|
|
"${task_packwiz[@]}" refresh
|
|
"$task_root/scripts/spike-build.sh" "$PWD"
|