Try to fix Mac again, write version number
This commit is contained in:
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@@ -115,7 +115,14 @@ jobs:
|
||||
env:
|
||||
OS_NAME: ${{ matrix.os-name }}
|
||||
run: |
|
||||
python ./resources/ci/common/prepare_appversion.py
|
||||
python ./resources/ci/common/prepare_release.py
|
||||
# upload appversion artifact for later step
|
||||
- name: Upload AppVersion Artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: appversion-${{ matrix.os-name }}
|
||||
path: ./resources/app/meta/manifests/app_version.txt
|
||||
# upload archive artifact for later step
|
||||
- name: Upload Archive Artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
|
||||
@@ -2,6 +2,11 @@ import common
|
||||
import os # for env vars
|
||||
import subprocess # do stuff at the shell level
|
||||
|
||||
from Main import __version__ as DRVersion
|
||||
|
||||
with(open(os.path.join("resources","app","meta","manifests","app_version.txt"),"w+")) as f:
|
||||
f.write(DRVersion)
|
||||
|
||||
env = common.prepare_env()
|
||||
|
||||
# get executables
|
||||
|
||||
20
resources/ci/common/prepare_appversion.py
Normal file
20
resources/ci/common/prepare_appversion.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import common
|
||||
import os # for env vars
|
||||
from shutil import copy # file manipulation
|
||||
|
||||
env = common.prepare_env()
|
||||
|
||||
# set tag to app_version.txt
|
||||
if not env["GITHUB_TAG"] == "":
|
||||
with open(os.path.join(".","resources","app","meta","manifests","app_version.txt"),"w+") as f:
|
||||
_ = f.read()
|
||||
f.seek(0)
|
||||
f.write(env["GITHUB_TAG"])
|
||||
f.truncate()
|
||||
|
||||
if not os.path.isdir(os.path.join("..","build")):
|
||||
os.mkdir(os.path.join("..","build"))
|
||||
copy(
|
||||
os.path.join(".","resources","app","meta","manifests","app_version.txt"),
|
||||
os.path.join("..","build","app_version.txt")
|
||||
)
|
||||
@@ -7,6 +7,9 @@ from shutil import copy, make_archive, move, rmtree # file manipulation
|
||||
|
||||
env = common.prepare_env()
|
||||
|
||||
if "OS_NAME" in env and env["OS_NAME"] == "osx":
|
||||
subprocess.check_call(["ls","-l"])
|
||||
|
||||
# make dir to put the binary in
|
||||
if not os.path.isdir(os.path.join("..","artifact")):
|
||||
os.mkdir(os.path.join("..","artifact"))
|
||||
|
||||
Reference in New Issue
Block a user