Try to fix Mac again, write version number

This commit is contained in:
Mike A. Trethewey
2020-02-27 00:40:35 -08:00
parent 0a2e9cde39
commit f09346e5cb
4 changed files with 35 additions and 0 deletions

View File

@@ -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

View File

@@ -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

View 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")
)

View File

@@ -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"))