swiftpm2nix: add support for workspace-state v6
This commit is contained in:
parent
c96a05a293
commit
88be91f08c
|
@ -6,7 +6,7 @@ in rec {
|
|||
|
||||
# Derive a pin file from workspace state.
|
||||
mkPinFile = workspaceState:
|
||||
assert workspaceState.version == 5;
|
||||
assert workspaceState.version >= 5 && workspaceState.version <= 6;
|
||||
json.generate "Package.resolved" {
|
||||
version = 1;
|
||||
object.pins = map (dep: {
|
||||
|
|
|
@ -12,7 +12,8 @@ if [[ ! -f "$stateFile" ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$(jq .version $stateFile)" != "5" ]]; then
|
||||
stateVersion="$(jq .version $stateFile)"
|
||||
if [[ $stateVersion -lt 5 || $stateVersion -gt 6 ]]; then
|
||||
echo >&2 "Unsupported $stateFile version"
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue