minecraft-servers: fix update.py

Previously, running `nix-shell maintainers/scripts/update.nix --argstr package minecraft-server` caused `versions.json` to be placed in the repository root instead of `pkgs/games/minecraft-servers`.
This commit is contained in:
Joel 2022-02-02 11:34:43 +10:00
parent efbc723c5e
commit 56076698c2
No known key found for this signature in database
GPG Key ID: 18550BD205E9EF64

View File

@ -4,6 +4,7 @@
import json
from dataclasses import dataclass, field
from datetime import datetime
from pathlib import Path
from typing import Any, Dict, List, Optional
import requests
@ -150,6 +151,6 @@ def generate() -> Dict[str, Dict[str, str]]:
if __name__ == "__main__":
with open("versions.json", "w") as file:
with open(Path(__file__).parent / "versions.json", "w") as file:
json.dump(generate(), file, indent=2)
file.write("\n")