Merge remote-tracking branch 'refs/remotes/gh/dev' into dev
This commit is contained in:
		
						commit
						1c5cbd768d
					
				
					 1 changed files with 41 additions and 0 deletions
				
			
		
							
								
								
									
										41
									
								
								Makefile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								Makefile
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,41 @@ | |||
| # Builds a release container
 | ||||
| build-container-release:  | ||||
| 	podman build -t ttime-server -f container/Containerfile . | ||||
| 
 | ||||
| # Builds a release container and runs it
 | ||||
| start-release: build-container-release remove-podman-containers | ||||
| 	podman run -d -e DATABASE_URL=sqlite:release.db -p 8080:8080 --name ttime ttime-server | ||||
| 	@echo "Started production ttime-server on http://localhost:8080" | ||||
| 
 | ||||
| # Removes and stops any containers related to the project
 | ||||
| remove-podman-containers: | ||||
| 	podman container rm -fi ttime | ||||
| 
 | ||||
| # Tests every part of the project
 | ||||
| testall: | ||||
| 	cd frontend && npm test | ||||
| 	cd frontend && npm run lint | ||||
| 	cd backend && make test | ||||
| 	cd backend && make lint | ||||
| 
 | ||||
| # Cleans up everything related to the project
 | ||||
| clean: remove-podman-containers | ||||
| 	podman image rm -fi ttime-server | ||||
| 	rm -rf frontend/dist | ||||
| 	rm -rf frontend/node_modules | ||||
| 	rm -f ttime-server.tar.gz | ||||
| 	cd backend && make clean | ||||
| 	@echo "Cleaned up!" | ||||
| 
 | ||||
| # Cleans up everything related to podman, not just the project. Make sure you understand what this means.
 | ||||
| podman-clean: | ||||
| 	podman system reset --force | ||||
| 
 | ||||
| # Installs the linter, which is not included in the ubuntu repo
 | ||||
| install-linter: | ||||
| 	curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.56.2 | ||||
| 
 | ||||
| # This installs just, a make alternative, which is slightly more ergonomic to use
 | ||||
| install-just: | ||||
| 	@echo "Installing just" | ||||
| 	@curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 dDogge
						dDogge