{
    "version": "2.0.16",
    "description": "The Syncthing global discovery server",
    "homepage": "https://syncthing.net/",
    "license": "MPL-2.0",
    "architecture": {
        "64bit": {
            "url": "https://github.com/syncthing/discosrv/releases/download/v2.0.16/stdiscosrv-windows-amd64-v2.0.16.zip",
            "hash": "f43f4bb9d4e6548af321f90b7aff38bc1c399811ac8f7e8168280a9c0fbb28aa",
            "extract_dir": "stdiscosrv-windows-amd64-v2.0.16"
        },
        "32bit": {
            "url": "https://github.com/syncthing/discosrv/releases/download/v2.0.16/stdiscosrv-windows-386-v2.0.16.zip",
            "hash": "b59d6450ce172469d9f390c316b6311e7f425fe521b8c54232a91f57003328c9",
            "extract_dir": "stdiscosrv-windows-386-v2.0.16"
        }
    },
    "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"
            }
        }
    }
}
