From d2ab09db5df906e60d5df4edb73ddd10480e3a9d Mon Sep 17 00:00:00 2001 From: William Ballenthin Date: Thu, 2 Jul 2020 01:38:06 -0600 Subject: [PATCH] pyinstaller: embed capa version in exe --- ci/pyinstaller.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ci/pyinstaller.spec b/ci/pyinstaller.spec index c62505ae..785db528 100644 --- a/ci/pyinstaller.spec +++ b/ci/pyinstaller.spec @@ -1,7 +1,14 @@ # -*- mode: python -*- import os.path +import subprocess + import wcwidth + +with open('./capa/version.py', 'wb') as f: + f.write("__version__ = '%s'" + % subprocess.check_output(["git", "describe", "--always"]).strip()) + a = Analysis( ['../capa/main.py'], pathex=['capa'],