diff --git a/tools/build.sh b/tools/build.sh index 91e16a5..0090b8e 100755 --- a/tools/build.sh +++ b/tools/build.sh @@ -5,4 +5,4 @@ else wget https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/$BUILDER fi 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 diff --git a/tools/update_version.py b/tools/update_version.py new file mode 100755 index 0000000..8639edd --- /dev/null +++ b/tools/update_version.py @@ -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") +