gosora/run-linux

39 lines
653 B
Plaintext

echo "Deleting artifacts from previous builds"
rm -f template_*.go
rm -f gen_*.go
rm -f tmpl_client/template_*.go
rm -f ./Gosora
echo "Generating the dynamic code"
go generate
runBuilder()
{
PATH=$1
BINNAME=$2
shift;shift;
WHATIS=$@
echo "Building the $WHATIS generator"
cd $PATH
go build -o $BINNAME
mv "./$BINNAME" ..
cd ..
echo "Running the $WHATIS generator"
./$BINNAME
}
runBuilder ./router_gen RouterGen router
runBuilder ./query_gen QueryGen query
echo "Building Gosora"
go build -o Gosora
echo "Building the templates"
./Gosora -build-templates
echo "Building Gosora... Again"
go build -o Gosora
echo "Running Gosora"
./Gosora