1
0
forked from IPKM/nmreval

make the build version dependent on commit revision number (first 7 characters)

This commit is contained in:
Markus Rosenstihl 2022-11-23 09:15:52 +01:00
parent 750f56606b
commit 407953f53e
2 changed files with 15 additions and 1 deletions

View File

@ -5,4 +5,4 @@ else
wget https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/$BUILDER wget https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/$BUILDER
fi fi
chmod +x appimage-builder-1.1.0-x86_64.AppImage chmod +x appimage-builder-1.1.0-x86_64.AppImage
./appimage-builder-1.1.0-x86_64.AppImage --skip-tests ./appimage-builder-1.1.0-x86_64.AppImage --skip-tests --recipe AppImageBuilder${GO_PIPELINE_LABEL:-}.yml

14
tools/update_version.py Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env python3
import os
import yaml
if __name__ == "__main__":
if "GO_PIPELINE_LABEL" in os.environ:
version = os.environ["GO_PIPELINE_LABEL"]
appimage_yaml = yaml.safe_load(open("AppImageBuilder.yml"))
appimage_yaml["AppDir"]["app_info"]["version"] = version
with open(f"AppImageBuilder{version}.yml","wb") as yaml_file:
yaml.safe_dump(appimage_yaml, yaml_file, encoding = 'utf-8')
else:
print("No GO_PIPELINE_LABEL found, doing nothing")