post-update.sample1 (854B)
1 #!/usr/bin/env sh
2 # SPDX-License-Identifier: AGPL-3.0-or-later
3 # SPDX-FileCopyrightText: 2021-2024 JayVii <jayvii[AT]posteo[DOT]de>
4
5 # Automatic packaging and deployment of stagit-scripts from bare git remote
6 # via git archive
7
8 # Create Deployment Package
9 git archive main . \
10 ":!LICENSES" \
11 ":!LICENSE" \
12 ":!examples" \
13 ":!README" \
14 ":!.reuse" \
15 ":!.git" \
16 ":!.gitignore" \
17 ":!Makefile" \
18 --format=tar.gz \
19 -o "deployable.tar.gz"
20 sha256sum deployable.tar.gz > $HOME/pub/stagit-scripts/exports/deployable.tar.gz.sha256
21 mv deployable.tar.gz $HOME/pub/stagit-scripts/exports/deployable.tar.gz
22 echo "Deployable can be retrieved from pub/stagit-scripts/exports/deployable.tar.gz"
23
24 # Deploy to webroot
25 tar xfz $HOME/pub/stagit-scripts/exports/deployable.tar.gz --directory $HOME/
26 echo "New version deployed to webroot"