moat-src 0.9.0__py3-none-any.whl → 0.9.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- moat/src/_main.py +18 -14
- {moat_src-0.9.0.dist-info → moat_src-0.9.2.dist-info}/METADATA +1 -1
- {moat_src-0.9.0.dist-info → moat_src-0.9.2.dist-info}/RECORD +6 -6
- {moat_src-0.9.0.dist-info → moat_src-0.9.2.dist-info}/WHEEL +0 -0
- {moat_src-0.9.0.dist-info → moat_src-0.9.2.dist-info}/licenses/LICENSE.txt +0 -0
- {moat_src-0.9.0.dist-info → moat_src-0.9.2.dist-info}/top_level.txt +0 -0
moat/src/_main.py
CHANGED
@@ -9,6 +9,7 @@ import sys
|
|
9
9
|
from collections import defaultdict, deque
|
10
10
|
from configparser import RawConfigParser
|
11
11
|
from pathlib import Path
|
12
|
+
from copy import deepcopy
|
12
13
|
|
13
14
|
import asyncclick as click
|
14
15
|
import git
|
@@ -188,7 +189,7 @@ class Package(_Common):
|
|
188
189
|
lc = self.last_commit
|
189
190
|
except AttributeError:
|
190
191
|
return True
|
191
|
-
for d in head.diff(self.last_commit, paths=
|
192
|
+
for d in head.diff(self.last_commit, paths=self.path if main else Path("packaging")/self.dash):
|
192
193
|
if (
|
193
194
|
self._repo.repo_for(d.a_path, main) != self.name
|
194
195
|
and self._repo.repo_for(d.b_path, main) != self.name
|
@@ -224,11 +225,16 @@ class Repo(git.Repo, _Common):
|
|
224
225
|
self.moat_name = "-".join(p.parts[mi:])
|
225
226
|
with open("versions.yaml") as f:
|
226
227
|
self.versions = yload(f, attr=True)
|
228
|
+
self.orig_versions = deepcopy(self.versions)
|
229
|
+
|
227
230
|
|
228
231
|
def write_tags(self):
|
232
|
+
if self.versions == self.orig_versions:
|
233
|
+
return False
|
229
234
|
with open("versions.yaml", "w") as f:
|
230
235
|
yprint(self.versions, f)
|
231
236
|
self.index.add("versions.yaml")
|
237
|
+
return True
|
232
238
|
|
233
239
|
@property
|
234
240
|
def last_tag(self) -> Tag | None:
|
@@ -744,11 +750,11 @@ def tag(obj, run, minor, major, subtree, force, FORCE, show, build):
|
|
744
750
|
r = repo
|
745
751
|
|
746
752
|
if show:
|
747
|
-
tag = r.
|
753
|
+
tag = r.vers
|
748
754
|
if r.has_changes():
|
749
|
-
print(f"{tag} STALE")
|
755
|
+
print(f"{tag.tag}-{tag.pkg} STALE")
|
750
756
|
else:
|
751
|
-
print(tag)
|
757
|
+
print(f"{tag.tag}-{tag.pkg}")
|
752
758
|
return
|
753
759
|
|
754
760
|
if force:
|
@@ -770,10 +776,11 @@ def tag(obj, run, minor, major, subtree, force, FORCE, show, build):
|
|
770
776
|
pkg=1,
|
771
777
|
rev=repo.head.commit.hexsha,
|
772
778
|
)
|
779
|
+
print(f"{tag}-{sb.vers.pkg}")
|
773
780
|
repo.write_tags()
|
774
781
|
else:
|
775
782
|
git.TagReference.create(repo, tag, force=FORCE)
|
776
|
-
|
783
|
+
print(f"{tag}")
|
777
784
|
else:
|
778
785
|
print(f"{tag} DRY_RUN")
|
779
786
|
|
@@ -949,7 +956,7 @@ async def build(
|
|
949
956
|
fails = set()
|
950
957
|
for p in parts:
|
951
958
|
if not run_tests(p, *pytest_opts):
|
952
|
-
fails.add(p
|
959
|
+
fails.add(p)
|
953
960
|
if fails:
|
954
961
|
if not run:
|
955
962
|
print("*** Tests failed:", *fails, file=sys.stderr)
|
@@ -1070,9 +1077,10 @@ async def build(
|
|
1070
1077
|
targz = rd / "dist" / f"{r.under}-{tag}.tar.gz"
|
1071
1078
|
done = rd / "dist" / f"{r.under}-{tag}.done"
|
1072
1079
|
|
1073
|
-
if
|
1074
|
-
|
1075
|
-
|
1080
|
+
if done.exists():
|
1081
|
+
pass
|
1082
|
+
elif targz.is_file():
|
1083
|
+
up.add(r)
|
1076
1084
|
else:
|
1077
1085
|
try:
|
1078
1086
|
subprocess.run(["python3", "-mbuild", "-snw"], cwd=rd, check=True)
|
@@ -1152,11 +1160,7 @@ async def build(
|
|
1152
1160
|
|
1153
1161
|
# Step 8: commit the result
|
1154
1162
|
if run:
|
1155
|
-
|
1156
|
-
r.vers.rev = repo.head.commit.hexsha
|
1157
|
-
repo.write_tags()
|
1158
|
-
|
1159
|
-
if not no_commit:
|
1163
|
+
if repo.write_tags() and not no_commit:
|
1160
1164
|
repo.index.commit(f"Build version {forcetag}")
|
1161
1165
|
git.TagReference.create(repo, forcetag)
|
1162
1166
|
|
@@ -1,14 +1,14 @@
|
|
1
1
|
moat/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
moat/src/_cfg.yaml,sha256=bXRcamFBn1VCc7MhGBiWK5ciq4qw6iXyZzRJWvs_m0Q,35
|
3
|
-
moat/src/_main.py,sha256=
|
3
|
+
moat/src/_main.py,sha256=S51OJxg2D_maDZXL8o3utB_oQj6xJaBu6gVfEIAGHss,35079
|
4
4
|
moat/src/inspect.py,sha256=rUU-FQyQoQP8LJCebbtdL6lgzz9KPH7KGSq11kD4nmU,1489
|
5
5
|
moat/src/test.py,sha256=rA-YV_VDwtfBk-bzIEa31fk9GHl6V8f4HTXejLoAAbk,2187
|
6
6
|
moat/src/_templates/moat/__init__.py,sha256=ZBoFcXbv35djD599Vo_PKTqDjvQXYYXTcPUs5RcQZrs,101
|
7
7
|
moat/src/_templates/moat/_main.py,sha256=8gLupAmWb5T6wLkQYTi99V1nyaS8cAIccwxHet2ydFw,321
|
8
8
|
moat/src/_templates/packaging/pyproject.default.yaml,sha256=nHUa7dQhe8QpDH9Gbmjflf3BI3ECk2cuXArf0oPCgeg,2801
|
9
9
|
moat/src/_templates/packaging/pyproject.forced.yaml,sha256=djfcy3hgfoIgrn2pRrxDWTyN3EEsA1y5NhkzYrGjgNY,1427
|
10
|
-
moat_src-0.9.
|
11
|
-
moat_src-0.9.
|
12
|
-
moat_src-0.9.
|
13
|
-
moat_src-0.9.
|
14
|
-
moat_src-0.9.
|
10
|
+
moat_src-0.9.2.dist-info/licenses/LICENSE.txt,sha256=L5vKJLVOg5t0CEEPpW9-O_0vzbP0PEjEF06tLvnIDuk,541
|
11
|
+
moat_src-0.9.2.dist-info/METADATA,sha256=Et-HEllEperfceY6IQQkkC4VFOsu0-bH4eJY9Pa8To0,733
|
12
|
+
moat_src-0.9.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
13
|
+
moat_src-0.9.2.dist-info/top_level.txt,sha256=pcs9fl5w5AB5GVi4SvBqIVmFrkRwQkVw_dEvW0Q0cSA,5
|
14
|
+
moat_src-0.9.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|