Deploy Git repository

Date: 2018-10-15
#!/bin/bash
auth=user:pass
repo=https://solidt.eu/git/user/repo/archive/master.tar.gz
target=test1
mkdir -p $target
curl -u $auth $repo | tar -zxv -C $target --strip-components=1
#git archive --format=tar --remote=https://solidt.eu/git/user/repo.git master src/  | tar -xv

!/bin/bash
dir=$(dirname "$0")
auth=user:password
repo=https://solidt.eu/git/niels.kooiman/personal-assistant/archive/master.tar.gz
target=personal-assistant
set -x
cd $dir
pwd
rm -rf $target
mkdir -p $target
curl -u $auth $repo | tar -zxv -C $target --strip-components=1

pushd $target
npm install
npm run build:test
npm run build
rm -rf /srv/http/pa.solidt.eu/*
cp -rv build/* /srv/http/pa.solidt.eu/
popd

14420cookie-checkDeploy Git repository