NFive / nfpm

NFive Plugin Manager
GNU General Public License v3.0
3 stars 10 forks source link

Support for 7zip server archive files #37

Closed steveski closed 3 years ago

steveski commented 3 years ago

The setup file archive types have changed to 7z since 3434. In this PR I've changed windows filename to be either server.zip or server.7z. Conditionals have to be wrapped with ( ) which pushes the token indices out by 1 so incremented the group indices for recommend and optional versions. Added an optional space after the http= to cater for a mismatch which is on the current version of the downloads page. image

The bintray service is now JFrog and the links compiled into nfpm fail to download the NFive release. If you try to run nfpm even without this PR merged in nfpm fails at the NFive install step. You should approve this PR based on whether the server.7z downloads and decompresses correctly, not whether the whole process works. I've forked all repositories from github.com/NFive and will progressively work through to try to fix things. So far I've built and release a v1.0 of nfive which I'm testing. If you use the following code then you'll at least be able to see nfpm complete successfully. I'll work on the GitHub adapter to get it workign out the version number to use in the version token.

private static async Task InstallNFive(string path)
{
    Console.WriteLine("Finding latest NFive version...");

    // The NFive build pipeline will put the version into the filename
    //var version = (await Adapters.Bintray.Version.Get("nfive/NFive/NFive")).Name;
    var version = "1.0";
    var data = await DownloadCached($"https://github.com/HTB-5M/NFive/releases/latest/download/nfive_{version}.zip", "NFive", version, $"nfive_{version}.zip");

    Install(path, "NFive", data.Item1);
}