makefile: release process tweaks
- hledgercabal does a cabal configure & build - move unit-testing of the cabal executable into cabaltest - cabaltest now also does cabal upload --check - hackageupload does the upload instead of talking about it - release and releaseupload are now separate for safety - don't let pushbinary stop make due to missing binary - updatesite pushes pending changes first
This commit is contained in:
		
							parent
							
								
									2ae609fee6
								
							
						
					
					
						commit
						484580ca64
					
				
							
								
								
									
										18
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								Makefile
									
									
									
									
									
								
							@ -33,6 +33,10 @@ default: tag hledger
 | 
				
			|||||||
######################################################################
 | 
					######################################################################
 | 
				
			||||||
# BUILDING
 | 
					# BUILDING
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# build the standard cabal binary
 | 
				
			||||||
 | 
					hledgercabal:
 | 
				
			||||||
 | 
						cabal configure -fhapps -fvty && cabal build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# build the standard developer's binary, quickly
 | 
					# build the standard developer's binary, quickly
 | 
				
			||||||
hledger: setversion
 | 
					hledger: setversion
 | 
				
			||||||
	ghc --make hledger.hs -o hledger $(BUILDFLAGS) # -O
 | 
						ghc --make hledger.hs -o hledger $(BUILDFLAGS) # -O
 | 
				
			||||||
@ -109,7 +113,6 @@ committest: unittest doctest haddocktest warningstest
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# thorough, pre-release tests - run before release
 | 
					# thorough, pre-release tests - run before release
 | 
				
			||||||
releasetest: unittest doctest haddocktest warningstest cabaltest
 | 
					releasetest: unittest doctest haddocktest warningstest cabaltest
 | 
				
			||||||
	@dist/build/hledger/hledger test 2>&1 | tail -1 | grep -q 'Errors: 0  Failures: 0'
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# run unit tests, without waiting for compilation
 | 
					# run unit tests, without waiting for compilation
 | 
				
			||||||
unittest:
 | 
					unittest:
 | 
				
			||||||
@ -144,6 +147,9 @@ cabaltest: setversion
 | 
				
			|||||||
		&& cabal check \
 | 
							&& cabal check \
 | 
				
			||||||
		&& cabal configure -fvty -fhapps \
 | 
							&& cabal configure -fvty -fhapps \
 | 
				
			||||||
		&& cabal build \
 | 
							&& cabal build \
 | 
				
			||||||
 | 
							&& dist/build/hledger/hledger test 2>&1 | tail -1 | grep -q 'Errors: 0  Failures: 0' \
 | 
				
			||||||
 | 
							&& cabal sdist \
 | 
				
			||||||
 | 
							&& cabal upload dist/hledger-$(VERSION).tar.gz --check -v3 \
 | 
				
			||||||
		&& echo $@ passed) || echo $@ FAILED
 | 
							&& echo $@ passed) || echo $@ FAILED
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# run performance tests and save results in profs/. 
 | 
					# run performance tests and save results in profs/. 
 | 
				
			||||||
@ -218,7 +224,7 @@ web:
 | 
				
			|||||||
	cd website; rm -f index.html; ln -s HOME.html index.html; rm -f profs; ln -s ../profs
 | 
						cd website; rm -f index.html; ln -s HOME.html index.html; rm -f profs; ln -s ../profs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# ..from anywhere
 | 
					# ..from anywhere
 | 
				
			||||||
updatesite:
 | 
					updatesite: push
 | 
				
			||||||
	ssh joyful.com 'make -C/repos/hledger web'
 | 
						ssh joyful.com 'make -C/repos/hledger web'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# generate pdf versions of main docs
 | 
					# generate pdf versions of main docs
 | 
				
			||||||
@ -319,7 +325,9 @@ hoogleindex: $(MAIN)
 | 
				
			|||||||
# doing a bugfix release: set VERSION to 0.5.1, make release hackageupload
 | 
					# doing a bugfix release: set VERSION to 0.5.1, make release hackageupload
 | 
				
			||||||
# building 0.6 alpha:     set VERSION to 0.5.98, make
 | 
					# building 0.6 alpha:     set VERSION to 0.5.98, make
 | 
				
			||||||
# releasing 0.6 beta:     set VERSION to 0.5.99, make release
 | 
					# releasing 0.6 beta:     set VERSION to 0.5.99, make release
 | 
				
			||||||
release: releasetest setandrecordversion tagrelease sdist hackageupload updatesite
 | 
					release: releasetest setandrecordversion tagrelease sdist
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					releaseupload: hackageupload updatesite
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# file where the current release version is defined
 | 
					# file where the current release version is defined
 | 
				
			||||||
VERSIONFILE=VERSION
 | 
					VERSIONFILE=VERSION
 | 
				
			||||||
@ -360,7 +368,7 @@ sdist:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# display a hackage upload command reminder
 | 
					# display a hackage upload command reminder
 | 
				
			||||||
hackageupload:
 | 
					hackageupload:
 | 
				
			||||||
	@echo please do: cabal upload dist/hledger-$(VERSION).tar.gz -v3
 | 
						cabal upload dist/hledger-$(VERSION).tar.gz -v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# send unpushed patches to the mail list
 | 
					# send unpushed patches to the mail list
 | 
				
			||||||
send:
 | 
					send:
 | 
				
			||||||
@ -387,7 +395,7 @@ pullprofs:
 | 
				
			|||||||
# make hledgerPLAT first
 | 
					# make hledgerPLAT first
 | 
				
			||||||
pushbinary:
 | 
					pushbinary:
 | 
				
			||||||
	-gzip -9 $(BINARYFILENAME)
 | 
						-gzip -9 $(BINARYFILENAME)
 | 
				
			||||||
	rsync -aP $(BINARYFILENAME).gz joyful.com:/repos/hledger/website/binaries/
 | 
						-rsync -aP $(BINARYFILENAME).gz joyful.com:/repos/hledger/website/binaries/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# show project stats useful for release notes
 | 
					# show project stats useful for release notes
 | 
				
			||||||
stats: showlastreleasedate showreleaseauthors showloc showcov showerrors showlocalchanges showreleasechanges benchmark
 | 
					stats: showlastreleasedate showreleaseauthors showloc showcov showerrors showlocalchanges showreleasechanges benchmark
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user