Skip to content

Commit 1c2d3dd

Browse files
committed
fix bump script
1 parent 1eb4120 commit 1c2d3dd

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

Makefile

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,7 @@ zip:
2121
cd $(PLUGIN_DIR) && zip -r ../$(ZIP_NAME) . -x '*.pyc' '__pycache__/*' '.DS_Store'
2222
@echo "Created $(ZIP_NAME)"
2323

24-
BUMP = python3 -c "\
25-
import re, sys; \
26-
part = sys.argv[1]; \
27-
f = '$(PLUGIN_DIR)/driver.py'; \
28-
txt = open(f).read(); \
29-
m = re.search(r'version\s*=\s*\((\d+),\s*(\d+),\s*(\d+)\)', txt); \
30-
M, m_, p = int(m.group(1)), int(m.group(2)), int(m.group(3)); \
31-
new = {'major': (M+1,0,0), 'minor': (M,m_+1,0), 'patch': (M,m_,p+1)}[part]; \
32-
open(f,'w').write(txt.replace(m.group(0), f'version = ({new[0]}, {new[1]}, {new[2]})')); \
33-
print(f'{M}.{m_}.{p} -> {new[0]}.{new[1]}.{new[2]}')"
24+
BUMP = python3 -c "import re, sys; part = sys.argv[1]; f = '$(PLUGIN_DIR)/driver.py'; txt = open(f).read(); m = re.search(r'version\s*=\s*\((\d+),\s*(\d+),\s*(\d+)\)', txt); M, m_, p = int(m.group(1)), int(m.group(2)), int(m.group(3)); new = {'major': (M+1,0,0), 'minor': (M,m_+1,0), 'patch': (M,m_,p+1)}[part]; open(f,'w').write(txt.replace(m.group(0), f'version = ({new[0]}, {new[1]}, {new[2]})')); print(f'{M}.{m_}.{p} -> {new[0]}.{new[1]}.{new[2]}')"
3425

3526
bump-patch:
3627
@$(BUMP) patch

0 commit comments

Comments
 (0)