修正 update
This commit is contained in:
		
							
								
								
									
										11
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								Makefile
									
									
									
									
									
								
							@@ -1,3 +1,5 @@
 | 
			
		||||
export host=main
 | 
			
		||||
 | 
			
		||||
# 运行本地开发环境(使用SSH隧道代理端口)
 | 
			
		||||
dev:
 | 
			
		||||
	@if ! go list -m github.com/air-verse/air@latest >/dev/null 2>&1; then \
 | 
			
		||||
@@ -19,12 +21,11 @@ build:
 | 
			
		||||
 | 
			
		||||
# 更新部署到服务器
 | 
			
		||||
update: build
 | 
			
		||||
	host=main
 | 
			
		||||
	ssh $host "mv ~/webp/main ~/webp/main_old"
 | 
			
		||||
	scp dist/main $host:~/webp/main
 | 
			
		||||
	ssh $(host) "mv ~/webp/main ~/webp/main_old"
 | 
			
		||||
	scp dist/main $(host):~/webp/main
 | 
			
		||||
	rm -rf dist
 | 
			
		||||
	ssh $host "systemctl restart webp"
 | 
			
		||||
	ssh $host "rm ~/webp/main_old"
 | 
			
		||||
	ssh $(host) "systemctl restart webp"
 | 
			
		||||
	ssh $(host) "rm ~/webp/main_old"
 | 
			
		||||
 | 
			
		||||
# 设为系统服务和设置日志轮转
 | 
			
		||||
service:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user