mirror of
				https://github.com/Mikaela/Limnoria.git
				synced 2025-11-04 09:37:25 +01:00 
			
		
		
		
	Merge commit '05e8b658e633f37456340b83b01fa304f9fcc5d3', Add script to automatically update version with a datestamp upon commit.
This commit is contained in:
		
						commit
						cf6fcb9928
					
				
							
								
								
									
										10
									
								
								sandbox/version-commit
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										10
									
								
								sandbox/version-commit
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,10 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
# Use this script to make commits. It will automatically update the version
 | 
			
		||||
# string to have a datetime stamp, prior to committing.
 | 
			
		||||
# All arguments get passed to git commit, so of course, use the -a option so that 
 | 
			
		||||
# the version change gets added to the commit.
 | 
			
		||||
echo "Updating version..."
 | 
			
		||||
perl -pi -e  "s/^version\s*=\s*['\"]([\S]+)[ '\"].*/version = '\1 ($( date -Iseconds ))'/" src/version.py
 | 
			
		||||
if [ "$?" -eq "0" ]; then
 | 
			
		||||
    git commit $@
 | 
			
		||||
fi
 | 
			
		||||
@ -1,3 +1,3 @@
 | 
			
		||||
"""stick the various versioning attributes in here, so we only have to change
 | 
			
		||||
them once."""
 | 
			
		||||
version = '0.83.4.1+gribble'
 | 
			
		||||
version = '0.83.4.1+gribble (2010-08-20T11:08:31-0400)'
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user