Edit scripts too, oops

This commit is contained in:
Ben Visness 2022-07-22 20:56:16 -05:00
parent 726cd0fd43
commit d3f5057d41
4 changed files with 11 additions and 3 deletions

View File

@ -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..."

View File

@ -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

View File

@ -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

8
src/main.go Normal file
View File

@ -0,0 +1,8 @@
package main
import "fmt"
func main() {
fmt.Println("main.go has moved! You should now run:")
fmt.Println("go run .")
}