chore: added makefile
This commit is contained in:
		
					parent
					
						
							
								28db7f21ab
							
						
					
				
			
			
				commit
				
					
						f7deb8c0a2
					
				
			
		
					 1 changed files with 31 additions and 0 deletions
				
			
		
							
								
								
									
										31
									
								
								Makefile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								Makefile
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,31 @@
 | 
			
		|||
# Set output dir
 | 
			
		||||
BUILDDIR=dist
 | 
			
		||||
 | 
			
		||||
#GH/github command used to initiate a release
 | 
			
		||||
GH=/usr/bin/gh
 | 
			
		||||
 | 
			
		||||
test:
 | 
			
		||||
	pytest -v
 | 
			
		||||
 | 
			
		||||
build: dir test
 | 
			
		||||
	poetry build
 | 
			
		||||
 | 
			
		||||
dir: 
 | 
			
		||||
	[ -d $(BUILDDIR) ] || mkdir -p $(BUILDDIR)
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	rm -rf $(BUILDDIR)
 | 
			
		||||
 | 
			
		||||
poetry-release: build
 | 
			
		||||
	poetry publish
 | 
			
		||||
 | 
			
		||||
gh-release: build
 | 
			
		||||
	#Figure out what the last/most recent build is
 | 
			
		||||
	$(eval LATEST = $(shell ls -t1 ${BUILDDIR}/*|head -n1))
 | 
			
		||||
	$(eval TAG = $(shell git describe --abbrev=0))
 | 
			
		||||
	@echo "Sending $(TAG) to github"
 | 
			
		||||
	${GH} release create $(TAG) $(LATEST)
 | 
			
		||||
 | 
			
		||||
release: poetry-release gh-release
 | 
			
		||||
 | 
			
		||||
.PHONY: dir clean release gh-release poetry-release
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue