Merge branch 'master' of ssh://chaos3.fkp.physik.tu-darmstadt.de/source/nmreval

This commit is contained in:
Markus Rosenstihl 2022-11-23 18:18:56 +01:00
commit dd3a49613e
4 changed files with 22 additions and 6 deletions

View File

@ -82,5 +82,5 @@ AppDir:
AppImage:
update-information: 'zsync|http://mirror.infra.pkm/nmreval/NMReval-latest-x86_64.AppImage.zsync'
sign-key: None
sign-key: 976AC9D78688B628B00D4944D319B98C2D6CE5D3
arch: x86_64

View File

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

15
tools/update_version.py Executable file
View File

@ -0,0 +1,15 @@
#!/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')
print(f"New AppImageBuilder file written: {yaml_file.name}")
else:
print("No GO_PIPELINE_LABEL found, doing nothing")

View File

@ -83,10 +83,11 @@ if __name__ == "__main__":
secret = os.environ["s3_secret"]
host = "mirror.infra.pkm:9000"
bucket = "nmreval-appimage"
if "GO_PIPELINE_LABEL" in os.environ:
appimage_version = os.environ["GO_PIPELINE_LABEL"]
else:
appimage_version = yaml.safe_load(open("AppImageBuilder.yml"))["AppDir"]["app_info"]["version"]
filenames = [f"NMReval-{appimage_version}-x86_64.AppImage",
f"NMReval-{appimage_version}-x86_64.AppImage.zsync",
]
print(f"Uploading NMReval-{appimage_version}-x86_64.AppImage and .zsync")
upload(key, secret, host, bucket,
f"NMReval-{appimage_version}-x86_64.AppImage")
upload(key, secret, host, bucket,