Skip to content
Snippets Groups Projects
Commit 5f1b5fd1 authored by Arie Peterson's avatar Arie Peterson
Browse files

Test app tarball before removing old app version

parent a6b7eac5
No related branches found
No related tags found
1 merge request!495Resolve "Consider allowing nextcloud to run when postStart fails"
......@@ -141,6 +141,10 @@ data:
# allows us to use version variable in the release_filename
{{- $_ := set $ "version" .version}}
curl "https://github.com/{{ .github_repository }}/releases/download/{{ .version }}/{{ tpl .release_filename $ }}" -Lo "{{ .name }}.tar.gz"
# If the above url results in a 404, curl will not complain and store the
# body of the 404 in the file :/. So we check here whether we actually
# got a valid archive; `tar` will fail if not.
tar -tf "{{ .name }}.tar.gz"
# Remove old version of the app
if [[ -d "$target_directory/{{ .name }}" ]]
then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment