export config
parent
8ea48ba4ee
commit
2bd074191a
26
default.zsh
26
default.zsh
|
@ -1,25 +1,27 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
function extract_option {
|
||||||
|
local file_name="$1"
|
||||||
|
local option="$2"
|
||||||
|
|
||||||
PROJECT=dodb.cr
|
sed -n "/^${option}: */{s/^${option}:[ \t]*//;p}" < $file_name
|
||||||
GIT=$(cat payload.json | jq '.repository.clone_url')
|
}
|
||||||
ENV=debian
|
|
||||||
SPECS=("crystal spec spec/test.cr --tap")
|
|
||||||
|
|
||||||
echo $GIT
|
|
||||||
|
PROJECT=$(jq -r '.repository.name' < payload.json)
|
||||||
|
GIT=$(jq -r '.repository.clone_url' < payload.json)
|
||||||
|
|
||||||
git clone $GIT
|
git clone $GIT
|
||||||
cd $PROJECT
|
cd $PROJECT
|
||||||
|
|
||||||
|
|
||||||
|
CMD=$(extract_option "hooks_config" "commande")
|
||||||
|
ENV=$(extract_option "hooks_config" "env")
|
||||||
|
REV=$(git rev-parse HEAD)
|
||||||
|
|
||||||
shards install
|
shards install
|
||||||
shards build
|
shards build
|
||||||
|
|
||||||
REV=$(git rev-parse HEAD)
|
/bin/sh -c $CMD | ../tap-aggregator add $PROJECT $ENV $REV
|
||||||
|
|
||||||
for i in ${SPECS[*]}
|
|
||||||
do
|
|
||||||
echo $i
|
|
||||||
/bin/sh -c $i | ../tap-aggregator add $PROJECT $ENV $REV
|
|
||||||
done
|
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue