Skip to content

Commit a486f72

Browse files
committed
Release all projects (fix #35)
1 parent 20e9624 commit a486f72

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
lines changed

‎multi/commands/bump_version.py‎

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,45 @@
11
from ..paths import PYPROJECT
22

33

4+
def print_gh(p):
5+
p.p()
6+
try:
7+
p.run('gh', 'repo', 'set-default', '--view', out=True)
8+
except Exception:
9+
p.p('FAIL')
10+
except:
11+
p.p("FUCK!")
12+
13+
14+
def name_dirname(p):
15+
if p.manager and p.name != p.manager["name"]:
16+
p.p(p.name, p.manager["name"])
17+
18+
419
def bump_version(project, rule_or_version='minor'):
20+
if not (pv := project.version):
21+
return
22+
msg = project.git('l', '-1', '--format=%s', out=True).strip()
23+
if msg.startswith('Update version to '):
24+
return
525
if project.git.is_dirty():
626
project.p('Dirty!')
727
return
8-
if not (pv := project.version):
28+
if not True:
29+
project.p()
930
return
31+
print()
32+
print()
33+
project.p('bump_version')
34+
print()
1035
project.run('rm', '-rf', 'dist/')
1136
project.p('v' + pv)
1237
project.uv('version', '--bump', rule_or_version)
1338
project = project.reload()
1439
assert pv != project.version, pv
1540

1641
version = 'v' + project.version
17-
1842
project.git.commit(f'Update version to {version}', '-a')
19-
if not True:
20-
return
2143
project.git('tag', version)
2244
project.git('push', '--tag', '--force-with-lease')
2345
project.run('gh', 'release', 'create', version, '--generate-notes')

‎multi/commands/git.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
CI = Path('.github/workflows/python-package.yml')
1111

1212

13+
def commits(project, count=2):
14+
project.p('\n' + project.git('l', f'-{count}', '--format=%s', out=True))
15+
print()
16+
17+
1318
def recent_commits():
1419
it = ((k, v.git.commits('-1', long=True)[0]) for k, v in PROJECTS.items())
1520
it = ((k, v.split('|')) for k, v in it)

0 commit comments

Comments
 (0)