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:
parent
efbc723c5e
commit
56076698c2
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue