Skip to content

Commit

Permalink
fixed up the debug and gave it a warning to make sure no one gets stu…
Browse files Browse the repository at this point in the history
…ck with it
  • Loading branch information
Tim Anema committed May 21, 2013
1 parent edcaeee commit f29d5bd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Go.gitignore
Expand Up @@ -22,3 +22,7 @@ _cgo_export.*
_testmain.go

*.exe


# revel build stuff
tmp/**/*
11 changes: 9 additions & 2 deletions gob.sh
Expand Up @@ -108,7 +108,7 @@ reveler () {
echo " reveler new,n Creates a new directory with a .goproj and .gitignore file in it."
echo " It then gets revel and builds it."
echo " reveler run,r Will run the revel project."
echo " reveler debug,d Will open a gdb console with the project ready to run."
echo " reveler debug,d Will build the app and open a gdb console with the project ready to run."
echo " reveler version Displays version Number."
echo ""
echo "Example:"
Expand Down Expand Up @@ -138,8 +138,15 @@ reveler () {
if [ "x$GOPATH" = "x" ]; then
echo "Oops, you are not in a project directory"
else
echo "####################################################"
echo "# Warning #"
echo "# -------------------------------------------------#"
echo "# This will be a built version of your app, any #"
echo "# changes will not be reflected in debug, revel #"
echo "# does not support this at the moment. #"
echo "####################################################"
local project_name=${GOPATH##*/}
revel build $project_name $project_name/tmp/$project_name > /dev/null && gdb --args $GOPATH/bin/$project_name -importPath $project_name -srcPath "$GOPATH/src" -runMode dev
revel clean test &> /dev/null && revel build $project_name $GOPATH/tmp/$project_name && (echo r ; cat) | gdb --args $GOPATH/bin/$project_name -importPath $project_name -srcPath "$GOPATH/src" -runMode dev
fi
;;
"version" ) echo $GOB_VERSION;;
Expand Down

0 comments on commit f29d5bd

Please sign in to comment.