pub / stagit-scripts

Building src.jayvii.de with stagit
git clone https://src.jayvii.de/pub/stagit-scripts.git
Home | Log | Files | Exports | Refs | README | RSS

commit 0f512520490402a6ed74f2d688123eb54a711ca7
parent 0047495cdf90a578af3a3ff4cbda43e8f827d4f0
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sun, 28 Apr 2024 22:04:58 +0200

Add post-update hook example

Diffstat:
MMakefile | 2++
MREADME | 10++++++++++
Aexamples/hooks/post-update.sample1 | 26++++++++++++++++++++++++++
3 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile @@ -5,6 +5,8 @@ package: git archive main . \ ":!LICENSES" \ + ":!LICENSE" \ + ":!examples" \ ":!README" \ ":!.reuse" \ ":!.git" \ diff --git a/README b/README @@ -81,6 +81,16 @@ You may also setup SSH-credentials for the user or SSH-Auth keys. You most likely want to setup a webserver (e.g. Apache2) with "/var/www/ git.myserver.com" (home of user "git") as its root-dir. +Examples +======== + +You'll find a post-update hook example in the "examples/hooks/" directory. + + examples/ + | + '- hooks/ + '- post-update.sample1 Automatic packaging and deployment + License ======= diff --git a/examples/hooks/post-update.sample1 b/examples/hooks/post-update.sample1 @@ -0,0 +1,26 @@ +#!/usr/bin/env sh +# SPDX-License-Identifier: AGPL-3.0-or-later +# SPDX-FileCopyrightText: 2021-2024 JayVii <jayvii[AT]posteo[DOT]de> + +# Automatic packaging and deployment of stagit-jayvii.de from bare git remote +# via git archive + +# Create Deployment Package +git archive main . \ + ":!LICENSES" \ + ":!LICENSE" \ + ":!examples" \ + ":!README" \ + ":!.reuse" \ + ":!.git" \ + ":!.gitignore" \ + ":!Makefile" \ + --format=tar.gz \ + -o "deployable.tar.gz" +sha256sum deployable.tar.gz > $HOME/pub/stagit-jayvii.de/exports/deployable.tar.gz.sha256 +mv deployable.tar.gz $HOME/pub/stagit-jayvii.de/exports/deployable.tar.gz +echo "Deployable can be retrieved from pub/stagit-jayvii.de/exports/deployable.tar.gz" + +# Deploy to webroot +tar xfz $HOME/pub/stagit-jayvii.de/exports/deployable.tar.gz --directory $HOME/ +echo "New version deployed to webroot"