tools: make draft-changelog-start, draft-changelog-update
[ci skip]
This commit is contained in:
		
							parent
							
								
									d4457931ef
								
							
						
					
					
						commit
						d4268b4c2e
					
				
							
								
								
									
										46
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										46
									
								
								Makefile
									
									
									
									
									
								
							| @ -1076,22 +1076,48 @@ haddock: \ | |||||||
| # # 	cd site/api && \
 | # # 	cd site/api && \
 | ||||||
| # # 	hoogle --convert=main.txt --output=default.hoo
 | # # 	hoogle --convert=main.txt --output=default.hoo
 | ||||||
| 
 | 
 | ||||||
| CHANGELOGSTART=`git describe --tags --abbrev=0` | # changelogs
 | ||||||
| #CHANGELOGSTART=hledger-1.2
 | #
 | ||||||
|  | # commits are appended as date-ordered org nodes to doc/CHANGES.org
 | ||||||
|  | # for easy editing.  This is used as the basis for package changelogs
 | ||||||
|  | # (hledger*/CHANGES) and release notes (site/release-notes.md).
 | ||||||
| 
 | 
 | ||||||
| changelog-draft: \ | DRAFTCHANGELOG=doc/CHANGES.org | ||||||
| 	$(call def-help,changelog-draft, print commits since last tag as org-mode nodes for drafting changelogs/release notes. Eg: make changelog-draft >>doc/CHANGES.draft.org ) | LASTCHANGELOGREF:=`grep -E '^[a-f0-9]{8}$$' $(DRAFTCHANGELOG) | tail -1` | ||||||
| 	@echo "* draft changelog for `git describe --tags`" | #TODO: list only from LASTTAG if no refs are present
 | ||||||
| 	@echo "** project" | #LASTTAG:=`git describe --tags --abbrev=0`
 | ||||||
| 	@git log --pretty=format:'ORGNODE %s (%an) %h%n%b' \
 | #GREPCHANGELOGREF:=grep -E '^[a-f0-9]{8}$$' $(DRAFTCHANGELOG)
 | ||||||
| 		--abbrev-commit --date-order $(CHANGELOGSTART).. \
 | #LASTCHANGELOGREF:=`($(GREPCHANGELOGREF) -q && ($(GREPCHANGELOGREF) | tail -1))` || `echo $(LASTTAG)`
 | ||||||
| 		| sed -e 's/^\*/-/' -e 's/^ORGNODE/***/' \
 | 
 | ||||||
| 		| sed -e 's/ (Simon Michael)//' | draft-changelog-start: \ | ||||||
|  | 	$(call def-help,draft-changelog-start, add an empty changelog outline to $(DRAFTCHANGELOG) ) | ||||||
|  | 	@make draft-changelog-template >>$(DRAFTCHANGELOG) | ||||||
|  | 
 | ||||||
|  | draft-changelog-template: \ | ||||||
|  | 	#$(call def-help,draft-changelog-template, print an empty org outline for drafting changelogs. ) | ||||||
|  | 	@echo "* draft changelog for `git describe --tags --abbrev=0`" | ||||||
| 	@echo "** hledger-lib" | 	@echo "** hledger-lib" | ||||||
| 	@echo "** hledger" | 	@echo "** hledger" | ||||||
| 	@echo "** hledger-ui" | 	@echo "** hledger-ui" | ||||||
| 	@echo "** hledger-web" | 	@echo "** hledger-web" | ||||||
| 	@echo "** hledger-api" | 	@echo "** hledger-api" | ||||||
|  | 	@echo "** project" | ||||||
|  | 
 | ||||||
|  | draft-changelog-%: \ | ||||||
|  | 	#$(call def-help,draft-changelog-STARTREF, print commits from STARTREF as org nodes. Eg: make draft-changelog-hledger-1.3 ) | ||||||
|  | 	@git log --abbrev-commit --reverse --pretty=format:'ORGNODE %s (%an)%n%b%h' $*.. \
 | ||||||
|  | 		| sed -e 's/^\*/-/' -e 's/^ORGNODE/***/' \
 | ||||||
|  | 		| sed -e 's/ (Simon Michael)//' | ||||||
|  | 
 | ||||||
|  | draft-changelog-add-%: \ | ||||||
|  | 	#$(call def-help,draft-changelog-add-STARTREF, add commits from STARTREF as org nodes to $(DRAFTCHANGELOG). Eg: make draft-changelog-add-HEAD~1 ) | ||||||
|  | 	@make draft-changelog-$* >>$(DRAFTCHANGELOG) | ||||||
|  | 
 | ||||||
|  | draft-changelog-update: \ | ||||||
|  | 	$(call def-help,draft-changelog-update, add any new commits as org nodes to $(DRAFTCHANGELOG) ) | ||||||
|  | 	@make draft-changelog-$(LASTCHANGELOGREF) >> $(DRAFTCHANGELOG) | ||||||
|  | 
 | ||||||
|  | #
 | ||||||
| 
 | 
 | ||||||
| # in subsequent rules, allow automatic variables to be used in prerequisites (use $$)
 | # in subsequent rules, allow automatic variables to be used in prerequisites (use $$)
 | ||||||
| .SECONDEXPANSION: | .SECONDEXPANSION: | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user