From d3f5057d416e44f2b808c88fa93a4f82168df3f5 Mon Sep 17 00:00:00 2001 From: Ben Visness Date: Fri, 22 Jul 2022 20:56:16 -0500 Subject: [PATCH] Edit scripts too, oops --- server/deploy.sh | 2 +- server/root.Makefile | 2 +- server/serversetup.sh | 2 +- src/main.go | 8 ++++++++ 4 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 src/main.go diff --git a/server/deploy.sh b/server/deploy.sh index c222411f..ae0ee467 100755 --- a/server/deploy.sh +++ b/server/deploy.sh @@ -23,7 +23,7 @@ set -euo pipefail cd /home/hmn/hmn git fetch --all git reset --hard origin/$branch -go build -o /home/hmn/bin/hmn src/main.go +go build -o /home/hmn/bin/hmn . SCRIPT echo "Running migrations..." diff --git a/server/root.Makefile b/server/root.Makefile index 71bd75bc..ac9fddeb 100644 --- a/server/root.Makefile +++ b/server/root.Makefile @@ -15,7 +15,7 @@ deploy: ## Manually build and deploy a branch of the website. /home/hmn/hmn/server/deploy.sh build: ## Rebuild the website binary - sudo -u hmn --preserve-env=PATH bash -c "cd ~/hmn && go build -o /home/hmn/bin/hmn src/main.go" + sudo -u hmn --preserve-env=PATH bash -c "cd ~/hmn && go build -o /home/hmn/bin/hmn ." edit-config: ## Edit the website config vim /home/hmn/hmn/src/config/config.go diff --git a/server/serversetup.sh b/server/serversetup.sh index 42f92b6c..d0538868 100755 --- a/server/serversetup.sh +++ b/server/serversetup.sh @@ -289,7 +289,7 @@ if [ $checkpoint -lt 110 ]; then cd /home/hmn/hmn echo "Building the site for the first time. This may take a while..." - go build -v -o /home/hmn/bin/hmn src/main.go + go build -v -o /home/hmn/bin/hmn . SCRIPT echo 'PATH=$PATH:/home/hmn/bin' >> ~/.bashrc diff --git a/src/main.go b/src/main.go new file mode 100644 index 00000000..41491293 --- /dev/null +++ b/src/main.go @@ -0,0 +1,8 @@ +package main + +import "fmt" + +func main() { + fmt.Println("main.go has moved! You should now run:") + fmt.Println("go run .") +}