dot

packages and services management
Log | Files | Refs | README

commit d6fd5f4dc0e5c32bdfd5a4767264754fa31232e1
parent 906d7c92a6844da2f58b395588e5b3dcae3349c8
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 20 Jan 2019 23:52:54 +0100

fix release script and package script

Diffstat:
Mconf/package | 4++--
Metc/git/release/hooks/post-receive.d/release | 11+++++++----
2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/conf/package b/conf/package @@ -1,8 +1,8 @@ #!/bin/sh -ex cd "$(mktemp -d)" -trap 'rm -rf "$PWD"' INT EXIT TERM -wget -O- https://tar.h-o.st.net/release/package.tar | tar -xf - +trap "rm -rf '$PWD'" INT EXIT TERM +wget -O- http://tar.h-o.st/package.tar | tar -xf - cd * make install diff --git a/etc/git/release/hooks/post-receive.d/release b/etc/git/release/hooks/post-receive.d/release @@ -1,6 +1,9 @@ #!/usr/bin/env execlineb -backtick -n x { pipeline { git rev-parse --show-toplevel } xargs basename } +backtick -n x { pwd } +importas pwd x + +backtick -n x { basename ${pwd} } importas name x define domain tar.h-o.st @@ -8,10 +11,10 @@ define domain tar.h-o.st if { mkdir -p /var/www/${domain} } cd /var/www/${domain} -ifte { redirfd -w 1 index.html ltree-html } +ifte { redirfd -w 1 index.html ltree-html } { exit 1 } -forbacktickx -n x { git tag } +forbacktickx -n x { git -C ${pwd} tag } importas tag x redirfd -w 1 ${name}-${tag}.tar -git archive --prefix ${name}-${tag} --format tar ${tag} +git -C ${pwd} archive --prefix ${name}-${tag}/ --format tar ${tag}