Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scripts/dp-depman/datapack_depends.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"dependencies": {
"dataLib": {
"source": "github",
"repo": "runtoolkit/dataLib",
"version": ">=v6.0.0",
"asset": "dataLib-full.zip"
"repo": "runtoolkit/suite",
"version": "v6.0.2",
"asset": "dataLib-dp-datapacks-dataLib.zip"
}
}
}
}
12 changes: 6 additions & 6 deletions scripts/dp-depman/datapack_depends.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"resolved": {
"dataLib": {
"source": "github",
"repo": "runtoolkit/dataLib",
"version": "6.0.0",
"asset_name": "dataLib-full.zip",
"download_url": "https://github.com/runtoolkit/dataLib/releases/download/v6.0.0/dataLib.zip",
"sha256": "c2f5cf679ce371b943b26998f0bfc803f0f1b4ba885aca4cd012b2c12df9629a"
"repo": "runtoolkit/suite",
"version": "6.0.2",
"asset_name": "dataLib-dp-datapacks-dataLib.zip",
"download_url": "https://github.com/runtoolkit/suite/releases/download/packs-latest/dataLib-dp-datapacks-dataLib.zip",
"sha256": "1318baefc36b27a0b53c0459b5e8d06c0d5c06fec0134ca3b03f8c603ab84246"
}
}
}
}
24 changes: 17 additions & 7 deletions scripts/dp-depman/example-pack/datapack_depends.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
{
"id": "example-pack",
"id": "examplePack",
"version": "1.0.0",
"description": "Demonstration datapack for dp-depman",
"description": "Example datapack dependency config",

"build": {
"output": "both"
"output": "both",
"exclude": [
".git",
".github",
".dp-cache",
"dist",
"datapack_depends.json",
"datapack_depends.lock",
"*.md",
"scripts/"
]
},

"dependencies": {
"dataLib": {
"source": "github",
"repo": "runtoolkit/dataLib",
"version": ">=v6.0.0",
"asset": "dataLib-full.zip"
"repo": "runtoolkit/suite",
"version": ">=v6.0.2",
"asset": "dataLib-dp-datapacks-dataLib.zip"
}
}
}
}
4 changes: 2 additions & 2 deletions scripts/dp-depman/example-pack/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"pack": {
"description": "example-pack — demonstrates dp-depman dependency system",
"min_format": 61,
"max_format": 88
"min_format": 107,
"max_format": 107
}
}
2 changes: 1 addition & 1 deletion scripts/dp-depman/scripts/depend_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

VALID_SOURCES = {"github", "submodule"}

CONSTRAINT_RE = r"^(\d+\.\d+(\.\d+)*(\.x)?|[><=~^]+\d+\.\d+(\.\d+)*)$"
CONSTRAINT_RE = r"^(\*|\d+\.\d+(\.\d+)*(\.x)?|[><=~^]+\d+\.\d+(\.\d+)*)$"

def validate_dep(dep_id: str, dep_cfg: dict):
import re
Expand Down
5 changes: 5 additions & 0 deletions scripts/dp-depman/scripts/dp-resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,13 @@ def version_matches(version: str, constraint: str) -> bool:
"1.2.x" → wildcard patch
"^1.2.0" → major fixed
"~1.2.0" → major+minor fixed
"*" → any version
"""
if constraint == "*":
return True

version = version.lstrip("v")
constraint = constraint.lstrip("v")
v = parse_version(version)

if re.match(r"^\d+\.\d+(\.\d+)*$", constraint):
Expand Down
Loading