Makefile: Add deploy helper
authorAndrey Petrov <andrey.petrov@shazow.net>
Tue, 13 Apr 2021 15:32:24 +0000 (11:32 -0400)
committerAndrey Petrov <andrey.petrov@shazow.net>
Tue, 13 Apr 2021 15:32:24 +0000 (11:32 -0400)
Makefile

index 10d208e07d242e34400bc5bc04d826637fed263a..ccaa784733c6c171410df98e3003611220a16716 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -38,3 +38,8 @@ release:
        CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 LDFLAGS='$(LDFLAGS)' ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE
        CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 LDFLAGS='$(LDFLAGS)' ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE
        CGO_ENABLED=0 GOOS=windows GOARCH=386 LDFLAGS='$(LDFLAGS)' ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE
+
+deploy: build/ssh-chat-linux_amd64.tgz
+       ssh -p 2022 ssh.chat tar xvz < build/ssh-chat-linux_amd64.tgz
+       @echo " --- Ready to deploy ---"
+       @echo "Run: ssh -p 2022 ssh.chat sudo systemctl restart ssh-chat"