-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathworkflow.py
More file actions
26 lines (22 loc) · 781 Bytes
/
Copy pathworkflow.py
File metadata and controls
26 lines (22 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import os
from sparrow.version_ops import VersionControl
from tools import update_setup_cfg
import time
from git import Repo
pkgname = "manim_express"
pkgdir = pkgname
vc = VersionControl(pkgname, pkgdir)
vc.update_version()
# update_setup_cfg()
vc.update_readme(readme_path="./README.md", license="MIT")
time.sleep(0.1)
vc.update_readme(readme_path="./README_zh.md", license="MIT")
# format code
# os.system("yapf -i -r ./manim_express")
repo = Repo('.')
repo.index.add(["README*.md", "requirements.txt", "workflow.py", "manim_express/version-config.yaml"])
repo.index.commit(f"[Upgrade] Version bump to [{vc.config['version']}]")
repo.create_tag(f"{vc.config['version']}")
remote = repo.remote()
remote.push(f"{vc.config['version']}")
remote.push()