-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from figsoda/cargo-lock
add support for updating packages using importCargoLock
- Loading branch information
Showing
13 changed files
with
4,894 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import subprocess | ||
|
||
import conftest | ||
|
||
from nix_update import main | ||
|
||
|
||
def test_main(helpers: conftest.Helpers) -> None: | ||
with helpers.testpkgs(init_git=True) as path: | ||
main( | ||
["--file", str(path), "--commit", "cargoLockExpand", "--version", "v0.3.8"] | ||
) | ||
subprocess.run( | ||
[ | ||
"nix", | ||
"eval", | ||
"--raw", | ||
"--extra-experimental-features", | ||
"nix-command", | ||
"-f", | ||
path, | ||
"cargoLockExpand.cargoDeps", | ||
], | ||
check=True, | ||
text=True, | ||
stdout=subprocess.PIPE, | ||
).stdout.strip() | ||
diff = subprocess.run( | ||
["git", "-C", path, "show"], | ||
text=True, | ||
stdout=subprocess.PIPE, | ||
check=True, | ||
).stdout.strip() | ||
print(diff) | ||
assert "Cargo.lock" in diff | ||
assert '+source = "git+' in diff | ||
assert "outputHashes" in diff | ||
assert "https://github.com/nix-community/nurl/compare/v0.3.7...v0.3.8" in diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import subprocess | ||
|
||
import conftest | ||
|
||
from nix_update import main | ||
|
||
|
||
def test_main(helpers: conftest.Helpers) -> None: | ||
with helpers.testpkgs(init_git=True) as path: | ||
main( | ||
[ | ||
"--file", | ||
str(path), | ||
"--commit", | ||
"cargoLockUpdate", | ||
"--version", | ||
"v0.0.255", | ||
] | ||
) | ||
subprocess.run( | ||
[ | ||
"nix", | ||
"eval", | ||
"--raw", | ||
"--extra-experimental-features", | ||
"nix-command", | ||
"-f", | ||
path, | ||
"cargoLockUpdate.cargoDeps", | ||
], | ||
check=True, | ||
text=True, | ||
stdout=subprocess.PIPE, | ||
).stdout.strip() | ||
diff = subprocess.run( | ||
["git", "-C", path, "show"], | ||
text=True, | ||
stdout=subprocess.PIPE, | ||
check=True, | ||
).stdout.strip() | ||
print(diff) | ||
assert "Cargo.lock" in diff | ||
assert '+source = "git+' in diff | ||
assert ( | ||
"https://github.com/charliermarsh/ruff/compare/v0.0.254...v0.0.255" in diff | ||
) |
Oops, something went wrong.