1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-27 21:49:08 +02:00
2019-12-20 18:57:08 +08:00

42 lines
503 B
Bash
Executable File

#!/usr/bin/env bash
set -e
dir=/tmp/test-kratos
rm -rf $dir
mkdir $dir
cd $dir
rm -rf ./a
kratos new a
cd ./a/cmd && go build
if [ $? -ne 0 ]; then
echo "Failed: all"
exit 1
else
rm -rf ../../a
fi
cd $dir
rm -rf ./b
kratos new b --grpc
cd ./b/cmd && go build
if [ $? -ne 0 ];then
echo "Failed: --grpc"
exit 1
else
rm -rf ../../b
fi
cd $dir
rm -rf ./c
kratos new c --http
cd ./c/cmd && go build
if [ $? -ne 0 ]; then
echo "Failed: --http"
exit 1
else
rm -rf ../../c
fi
rm -rf $dir