switch to go-modules.outputHash

This commit is contained in:
zowoq 2023-04-10 07:11:05 +10:00
parent 329edce9f7
commit 0ccd9cc0b1
2 changed files with 4 additions and 9 deletions

View File

@ -49,8 +49,7 @@ class Package:
changelog: Optional[str]
rev: str
hash: Optional[str]
vendor_hash: Optional[str]
vendor_sha256: Optional[str]
go_modules: Optional[str]
cargo_deps: Optional[str]
npm_deps: Optional[str]
tests: List[str]
@ -141,8 +140,7 @@ in {{
url = pkg.src.url or null;
rev = pkg.src.rev or null;
hash = pkg.src.outputHash or null;
vendor_hash = pkg.vendorHash or null;
vendor_sha256 = pkg.vendorSha256 or null;
go_modules = pkg.go-modules.outputHash or null;
cargo_deps = pkg.cargoDeps.outputHash or null;
raw_cargo_lock =
if pkg ? cargoDeps.lockFile then

View File

@ -332,11 +332,8 @@ def update(opts: Options) -> Package:
# if no package.hash was provided we just update the other hashes unconditionally
if update_hash or not package.hash:
if package.vendor_hash and package.vendor_sha256 == "_unset":
update_go_modules_hash(opts, package.filename, package.vendor_hash)
if package.vendor_sha256 and package.vendor_hash == "_unset":
update_go_modules_hash(opts, package.filename, package.vendor_sha256)
if package.go_modules:
update_go_modules_hash(opts, package.filename, package.go_modules)
if package.cargo_deps:
update_cargo_deps_hash(opts, package.filename, package.cargo_deps)