Skip to content

Commit

Permalink
Merge pull request #1974 from birdstakes/fix-compiler-build
Browse files Browse the repository at this point in the history
Add HA_VERSION to _compiled_version in compiler.spec
  • Loading branch information
TeamSpen210 authored Aug 22, 2023
2 parents 6bb2667 + 92efcb3 commit 6ed4b86
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/compiler.spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ elif utils.LINUX:
else:
suffix = ''

HA_VERSION = utils.get_git_version(hammeraddons)

# Unneeded packages that cx_freeze detects:
EXCLUDES = [
'bz2', # We aren't using this compression format (shutil, zipfile etc handle ImportError)..
Expand Down Expand Up @@ -120,7 +122,10 @@ print('DATA:', data_files)

# Write this to the temp folder, so it's picked up and included.
# Don't write it out though if it's the same, so PyInstaller doesn't reparse.
version_val = 'BEE_VERSION=' + repr(utils.get_git_version(SPECPATH))
version_val = f'''\
BEE_VERSION={utils.get_git_version(SPECPATH)!r}
HA_VERSION={HA_VERSION!r}
'''
print(version_val)
version_filename = os.path.join(workpath, '_compiled_version.py')

Expand Down

0 comments on commit 6ed4b86

Please sign in to comment.