| 
									
										
										
										
											2025-07-10 08:00:00 +01:00
										 |  |  | { git, writeShellApplication }: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | writeShellApplication { | 
					
						
							|  |  |  |   name = "tag-release"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   runtimeInputs = [ git ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   text = ''
 | 
					
						
							|  |  |  |     commit_sha="''${1:-HEAD}" | 
					
						
							| 
									
										
										
										
											2025-10-02 07:48:11 +01:00
										 |  |  |     prefix="''${2:-}" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-09-25 08:00:00 +01:00
										 |  |  |     tag="$(date '+%Y%m%d%R%S' | sed "s/://g")" | 
					
						
							| 
									
										
										
										
											2025-07-10 08:00:00 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-10-02 07:48:11 +01:00
										 |  |  |     test "$prefix" != "" && tag="$prefix/$tag" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-10 08:00:00 +01:00
										 |  |  |     echo "Tagging commit $(git rev-parse "''${commit_sha}") as ''${tag}."
 | 
					
						
							|  |  |  |     echo "" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     git tag "''${tag}" "''${commit_sha}" | 
					
						
							|  |  |  |   '';
 | 
					
						
							|  |  |  | } |