1
Fork 0
ci-images/images/gitea/test.sh

38 lines
565 B
Bash
Executable file

#!/bin/sh
set -e
cargo build
run() {
./target/debug/gitea package "$1" <<EOF
{
$2
"source": {
"access_token": "$GITEA_ACCESS_TOKEN",
"owner": "concourse",
"url": "https://git.sclu1034.dev",
"type": "generic",
"name": "test"
}
}
EOF
}
if [ -n "$1" ]; then
run "$@"
echo ""
exit 0
fi
echo "$(tput bold)Test: Check existing versions$(tput sgr0)"
run check
printf "\n\n"
echo "$(tput bold)Test: Check 'v0.1.0'$(tput sgr0)"
run check '
"params": {
"version": "0.1.0"
},
'
printf "\n"