Release System: Auto Update 'Addon Table' URLs & Upload Addon Zips #123
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -2,3 +2,4 @@
|
|||||||
*.png filter=lfs diff=lfs merge=lfs -text
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
*.jpg filter=lfs diff=lfs merge=lfs -text
|
*.jpg filter=lfs diff=lfs merge=lfs -text
|
||||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,7 +8,6 @@ __pycache__/
|
|||||||
env/
|
env/
|
||||||
build/
|
build/
|
||||||
develop-eggs/
|
develop-eggs/
|
||||||
dist/
|
|
||||||
downloads/
|
downloads/
|
||||||
eggs/
|
eggs/
|
||||||
.eggs/
|
.eggs/
|
||||||
|
1
dist/anim_cupboard/anim_cupboard-0.0.2.sha256
vendored
Normal file
1
dist/anim_cupboard/anim_cupboard-0.0.2.sha256
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
a1794a7d12f2bb2d49302e682099608fb310b62c6873ef5c1e514cbf0be4d6b2 anim_cupboard-0.0.2.zip
|
3
dist/anim_cupboard/anim_cupboard-0.0.2.zip
vendored
Normal file
3
dist/anim_cupboard/anim_cupboard-0.0.2.zip
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a1794a7d12f2bb2d49302e682099608fb310b62c6873ef5c1e514cbf0be4d6b2
|
||||||
|
size 23182
|
1
dist/asset_pipeline/asset_pipeline-0.1.1.sha256
vendored
Normal file
1
dist/asset_pipeline/asset_pipeline-0.1.1.sha256
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
498847bca3ae34f840ac61682352f5e3c4f38ccbdf0f41f5a845ac9fb5c51b08 asset_pipeline-0.1.1.zip
|
3
dist/asset_pipeline/asset_pipeline-0.1.1.zip
vendored
Normal file
3
dist/asset_pipeline/asset_pipeline-0.1.1.zip
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:498847bca3ae34f840ac61682352f5e3c4f38ccbdf0f41f5a845ac9fb5c51b08
|
||||||
|
size 102540
|
1
dist/blender_kitsu/blender_kitsu-0.1.1.sha256
vendored
Normal file
1
dist/blender_kitsu/blender_kitsu-0.1.1.sha256
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
3f35f32efaa935830db5a22d9ee03006b64d613a345194c89f17e3c18ac75b6c blender_kitsu-0.1.1.zip
|
3
dist/blender_kitsu/blender_kitsu-0.1.1.zip
vendored
Normal file
3
dist/blender_kitsu/blender_kitsu-0.1.1.zip
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3f35f32efaa935830db5a22d9ee03006b64d613a345194c89f17e3c18ac75b6c
|
||||||
|
size 429579
|
1
dist/blender_svn/blender_svn-0.2.1.sha256
vendored
Normal file
1
dist/blender_svn/blender_svn-0.2.1.sha256
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
65631c02457dc2e90431da92b2ea848722a4e2d7e496e310b24cfee933d137e8 blender_svn-0.2.1.zip
|
3
dist/blender_svn/blender_svn-0.2.1.zip
vendored
Normal file
3
dist/blender_svn/blender_svn-0.2.1.zip
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:65631c02457dc2e90431da92b2ea848722a4e2d7e496e310b24cfee933d137e8
|
||||||
|
size 332860
|
1
dist/bone_gizmos/bone_gizmos-0.0.2.sha256
vendored
Normal file
1
dist/bone_gizmos/bone_gizmos-0.0.2.sha256
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
f2d5eb1aa152e0a2b23cadd76003f4845039bc4c1f14bd069785c45ebebfc050 bone_gizmos-0.0.2.zip
|
3
dist/bone_gizmos/bone_gizmos-0.0.2.zip
vendored
Normal file
3
dist/bone_gizmos/bone_gizmos-0.0.2.zip
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f2d5eb1aa152e0a2b23cadd76003f4845039bc4c1f14bd069785c45ebebfc050
|
||||||
|
size 30072
|
1
dist/cache_manager/cache_manager-0.1.1.sha256
vendored
Normal file
1
dist/cache_manager/cache_manager-0.1.1.sha256
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
ad08e6c186dae1619d692c049af4c9fd1a529fa7973f31054637d804cd38d7af cache_manager-0.1.1.zip
|
3
dist/cache_manager/cache_manager-0.1.1.zip
vendored
Normal file
3
dist/cache_manager/cache_manager-0.1.1.zip
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ad08e6c186dae1619d692c049af4c9fd1a529fa7973f31054637d804cd38d7af
|
||||||
|
size 46469
|
1
dist/contactsheet/contactsheet-0.1.1.sha256
vendored
Normal file
1
dist/contactsheet/contactsheet-0.1.1.sha256
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
9b598006dca3489db5949ead90ad181e7cb50b3ec9739bcc6a06b41ec5b34dee contactsheet-0.1.1.zip
|
3
dist/contactsheet/contactsheet-0.1.1.zip
vendored
Normal file
3
dist/contactsheet/contactsheet-0.1.1.zip
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9b598006dca3489db5949ead90ad181e7cb50b3ec9739bcc6a06b41ec5b34dee
|
||||||
|
size 33473
|
1
dist/easy_weights/easy_weights-0.1.1.sha256
vendored
Normal file
1
dist/easy_weights/easy_weights-0.1.1.sha256
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
84e6a59d9a2381bac5dc85ca504c707560e5d74d4399773b0cf8e5f674a6ac01 easy_weights-0.1.1.zip
|
3
dist/easy_weights/easy_weights-0.1.1.zip
vendored
Normal file
3
dist/easy_weights/easy_weights-0.1.1.zip
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:84e6a59d9a2381bac5dc85ca504c707560e5d74d4399773b0cf8e5f674a6ac01
|
||||||
|
size 30507
|
1
dist/geonode_shapekeys/geonode_shapekeys-0.0.2.sha256
vendored
Normal file
1
dist/geonode_shapekeys/geonode_shapekeys-0.0.2.sha256
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
2f6cadfa3287672ba796e490909da875b0240e7f3174b7c1fefdb18c887443ca geonode_shapekeys-0.0.2.zip
|
3
dist/geonode_shapekeys/geonode_shapekeys-0.0.2.zip
vendored
Normal file
3
dist/geonode_shapekeys/geonode_shapekeys-0.0.2.zip
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:2f6cadfa3287672ba796e490909da875b0240e7f3174b7c1fefdb18c887443ca
|
||||||
|
size 225768
|
1
dist/grease_converter/grease_converter-0.1.1.sha256
vendored
Normal file
1
dist/grease_converter/grease_converter-0.1.1.sha256
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
add974faba7c26f7e5342ad0b50e62ec08dc7f7441f71565ddbd95354e60998e grease_converter-0.1.1.zip
|
3
dist/grease_converter/grease_converter-0.1.1.zip
vendored
Normal file
3
dist/grease_converter/grease_converter-0.1.1.zip
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:add974faba7c26f7e5342ad0b50e62ec08dc7f7441f71565ddbd95354e60998e
|
||||||
|
size 4904
|
1
dist/lattice_magic/lattice_magic-0.1.1.sha256
vendored
Normal file
1
dist/lattice_magic/lattice_magic-0.1.1.sha256
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
4e9e25a50c820f38f88979d070834051860b61df96053df68d592b5a1aa052f5 lattice_magic-0.1.1.zip
|
3
dist/lattice_magic/lattice_magic-0.1.1.zip
vendored
Normal file
3
dist/lattice_magic/lattice_magic-0.1.1.zip
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4e9e25a50c820f38f88979d070834051860b61df96053df68d592b5a1aa052f5
|
||||||
|
size 16785
|
1
dist/lighting_overrider/lighting_overrider-0.1.1.sha256
vendored
Normal file
1
dist/lighting_overrider/lighting_overrider-0.1.1.sha256
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
616a03fed057c5009a7f6382dca1e5cdee6f82f829c8ed7be894b8e2e0ab6afd lighting_overrider-0.1.1.zip
|
3
dist/lighting_overrider/lighting_overrider-0.1.1.zip
vendored
Normal file
3
dist/lighting_overrider/lighting_overrider-0.1.1.zip
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:616a03fed057c5009a7f6382dca1e5cdee6f82f829c8ed7be894b8e2e0ab6afd
|
||||||
|
size 28911
|
1
dist/pose_shape_keys/pose_shape_keys-0.0.2.sha256
vendored
Normal file
1
dist/pose_shape_keys/pose_shape_keys-0.0.2.sha256
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
086f6c7723a0ce4c32e58a6c239c8e07f0dca095e8b53742f930362c3ab4204f pose_shape_keys-0.0.2.zip
|
3
dist/pose_shape_keys/pose_shape_keys-0.0.2.zip
vendored
Normal file
3
dist/pose_shape_keys/pose_shape_keys-0.0.2.zip
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:086f6c7723a0ce4c32e58a6c239c8e07f0dca095e8b53742f930362c3ab4204f
|
||||||
|
size 30784
|
1
dist/render_review/render_review-0.1.1.sha256
vendored
Normal file
1
dist/render_review/render_review-0.1.1.sha256
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
ce1aaf7eeb386ad9e0e846f3646d1e5a927b8c6ad65d33494324bf189edb2f6b render_review-0.1.1.zip
|
3
dist/render_review/render_review-0.1.1.zip
vendored
Normal file
3
dist/render_review/render_review-0.1.1.zip
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ce1aaf7eeb386ad9e0e846f3646d1e5a927b8c6ad65d33494324bf189edb2f6b
|
||||||
|
size 42221
|
@ -124,6 +124,17 @@ def write_file(file_path: Path, content):
|
|||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
|
|
||||||
|
def replace_line(file_path: Path, new_line: str, line_number: int):
|
||||||
|
file = open(
|
||||||
|
file_path,
|
||||||
|
)
|
||||||
|
lines = file.readlines()
|
||||||
|
lines[line_number] = new_line
|
||||||
|
out = open(file_path, 'w')
|
||||||
|
out.writelines(lines)
|
||||||
|
out.close()
|
||||||
|
|
||||||
|
|
||||||
def get_directory(repo_root: Path, folder_name: str) -> Path:
|
def get_directory(repo_root: Path, folder_name: str) -> Path:
|
||||||
"""Returns directory PATH, creates one if none exists"""
|
"""Returns directory PATH, creates one if none exists"""
|
||||||
path = repo_root.joinpath(folder_name)
|
path = repo_root.joinpath(folder_name)
|
||||||
@ -263,6 +274,20 @@ def changelog_file_write(file_path: Path, content: str):
|
|||||||
return file_path
|
return file_path
|
||||||
|
|
||||||
|
|
||||||
|
def update_release_table(addon_dir: Path, version: str):
|
||||||
|
table_file = addon_dir.parent.parent.joinpath("README.md")
|
||||||
|
with open(table_file, 'r') as myFile:
|
||||||
|
for num, line in enumerate(myFile):
|
||||||
|
if addon_dir.name in line:
|
||||||
|
line_to_replace = num
|
||||||
|
break # Use first line found
|
||||||
|
splitted_line = line.split("|[v")
|
||||||
|
version_bump_text = splitted_line[1].replace(splitted_line[1][0:5], version)
|
||||||
|
new_line = line[: len(splitted_line[0]) + 3] + version_bump_text
|
||||||
|
replace_line(table_file, new_line, line_to_replace)
|
||||||
|
return table_file
|
||||||
|
|
||||||
|
|
||||||
def addon_package(directory: Path, commit_prefix: str, is_major=False, force=False):
|
def addon_package(directory: Path, commit_prefix: str, is_major=False, force=False):
|
||||||
"""
|
"""
|
||||||
For a give directory, if new commits are found after the commit matching 'commit_prefix',
|
For a give directory, if new commits are found after the commit matching 'commit_prefix',
|
||||||
@ -282,9 +307,11 @@ def addon_package(directory: Path, commit_prefix: str, is_major=False, force=Fal
|
|||||||
change_log_file = changelog_file_write(
|
change_log_file = changelog_file_write(
|
||||||
directory.joinpath("CHANGELOG.md"), change_log
|
directory.joinpath("CHANGELOG.md"), change_log
|
||||||
)
|
)
|
||||||
|
table_file = update_release_table(directory, version)
|
||||||
cli_command(f'git reset')
|
cli_command(f'git reset')
|
||||||
cli_command(f'git stage {change_log_file}')
|
cli_command(f'git stage {change_log_file}')
|
||||||
cli_command(f'git stage {init_file}')
|
cli_command(f'git stage {init_file}')
|
||||||
|
cli_command(f'git stage {table_file}')
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
['git', 'commit', '-m', f"Version Bump: {directory.name} {version}"],
|
['git', 'commit', '-m', f"Version Bump: {directory.name} {version}"],
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
@ -352,10 +379,7 @@ def addon_version_bump(directory: Path, is_major: bool):
|
|||||||
lines = file.readlines()
|
lines = file.readlines()
|
||||||
version = addon_version_get(lines[version_line], is_major)
|
version = addon_version_get(lines[version_line], is_major)
|
||||||
repl_str = f' "version": ({version}),\n'
|
repl_str = f' "version": ({version}),\n'
|
||||||
lines[version_line] = repl_str
|
replace_line(init_file, repl_str, version_line)
|
||||||
out = open(init_file, 'w')
|
|
||||||
out.writelines(lines)
|
|
||||||
out.close()
|
|
||||||
return init_file, version.replace(', ', '.').replace(',', '.')
|
return init_file, version.replace(', ', '.').replace(',', '.')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user