{
    "version": "1.23.4",
    "description": "The Syncthing global discovery server",
    "homepage": "https://syncthing.net/",
    "license": "MPL-2.0",
    "architecture": {
        "64bit": {
            "url": "https://github.com/syncthing/discosrv/releases/download/v1.23.4/stdiscosrv-windows-amd64-v1.23.4.zip",
            "hash": "1e1a3a23561739ac70e4ecf978d8f27aefbff9f7803ac2c9a0693551a799e603",
            "extract_dir": "stdiscosrv-windows-amd64-v1.23.4"
        },
        "32bit": {
            "url": "https://github.com/syncthing/discosrv/releases/download/v1.23.4/stdiscosrv-windows-386-v1.23.4.zip",
            "hash": "05bc52de69afcd94dfef832e5d074fd28c74d80cda5526ee6fcbd72559da9b9b",
            "extract_dir": "stdiscosrv-windows-386-v1.23.4"
        }
    },
    "bin": [
        [
            "stdiscosrv.exe",
            "stdiscosrv",
            "-cert \"$dir\\cert.pem\"",
            "-db-dir \"$dir\\discovery.db\"",
            "-key \"$dir\\key.pem\""
        ]
    ],
    "persist": [
        "discovery.db",
        "cert.pem",
        "key.pem"
    ],
    "pre_install": [
        "foreach ($name in @('cert.pem', 'key.pem')) {",
        "    if (!(Test-Path \"$persist_dir\\$name\")) {",
        "        New-Item -Force -Path \"$dir\" -Name $name | Out-Null",
        "    }",
        "}"
    ],
    "checkver": {
        "github": "https://github.com/syncthing/discosrv"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://github.com/syncthing/discosrv/releases/download/v$version/stdiscosrv-windows-amd64-v$version.zip",
                "extract_dir": "stdiscosrv-windows-amd64-v$version"
            },
            "32bit": {
                "url": "https://github.com/syncthing/discosrv/releases/download/v$version/stdiscosrv-windows-386-v$version.zip",
                "extract_dir": "stdiscosrv-windows-386-v$version"
            }
        }
    }
}
