* Always download files into cache
Previous implementation would skip downloading the file if no new hashes were requested. Issue is that the curseforge and modrinth exports require the file contents. Not retrieving the file violates these assumptions. Instead of creating new parameters to force a file download, I changed the code to simply always download instead. This seems like reasonable behaviour for a cache. This fixes#296
* Bump cache index version, delete potentially broken files from old version
Since an unrecognized loader has an index of -1, and since lower number indicate a better loader, an unrecognized loader (when found in b) would immediately be assumed to be a great loader. Since the loop for A properly handles it, B would always be assumed to be the best, which has quite wrong consequences.
Since the compatibility check only verified that the first characters matched
between the version strings, a one-character patch version could be
misinterpreted if a two-character patch version existed.
Since nix tries to update inputs on newer versions out of, I suppose,
some introduced incompatibility, `nix build` fails. And nixpkgs from
2023 sounds rather obsolete at this point, so update was kinda due I
think.
On newer versions of nixpkgs however buildGoModule has changed and
requires one of its arguments to be called vendorHash and not
vendorSha256, this patch changes that as well.
Fixes#297, closes#314, closes#307
if a branch is specified, but a release cannot be found on that branch, return an error instead of simply the latest release
Signed-off-by: unilock <unilock@fennet.rentals>
language:
- funcs, vars, log messages, etc.
api requests:
- make all requests use the makeGet() function
- include packwiz user agent
Signed-off-by: unilock <unilock@fennet.rentals>
- "file" -> "asset"
- "version" -> "tag" or "release" (where appropriate)
- fix updater.go for upstream changes
- make printed log messages more similar to those of other modules
- move http request function(s) to separate file "request.go"
- remove the concept of a "Mod"; we're using "Repo"s (GitHub repositories) instead
- remove unnecessary fields in structs
- use sha256 instead of sha1 for asset checksums
Signed-off-by: unilock <unilock@fennet.rentals>