Skip to content

Commit

Permalink
Update build.py
Browse files Browse the repository at this point in the history
  • Loading branch information
HIllya51 committed Apr 27, 2024
1 parent 221dda1 commit 570a039
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ jobs:

- name: loaddversion
id: loaddversion
run: python build.py loaddversion
run: |
python build.py loaddversion >version.txt
set /p GITHUB_OUTPUT=<version.txt
- name: Release LunaTranslator
uses: softprops/action-gh-release@v2
with:
Expand Down
6 changes: 3 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ def buildPlugins():


if __name__ == "__main__":
if sys.argv[1]=='loaddversion':
if sys.argv[1]=='loadversion':
os.chdir(rootDir)
with open('LunaTranslator/files/defaultconfig/static_data.json','r',encoding='utf8') as ff:
version=json.loads(ff.read())['version']
print('::set-output name=version::'+version)
print('version='+version)
exit()
arch = sys.argv[1]
isdebug=len(sys.argv)>2 and int(sys.argv[2])
Expand Down Expand Up @@ -268,4 +268,4 @@ def buildPlugins():
subprocess.run(f"{py37Path} -m pip install -r requirements.txt")
subprocess.run(cmdline)

subprocess.run(f'python pack.py {int(arch == "x86")} {isdebug}')
subprocess.run(f'python pack.py {int(arch == "x86")} {int(isdebug)}')

0 comments on commit 570a039

Please sign in to comment.