şunun yansıması
				https://github.com/quitesimpleorg/hs9001.git
				eşitlendi 2025-10-31 03:09:29 +01:00 
			
		
		
		
	Add 'version' command
Bu işleme şunda yer alıyor:
		
							
								
								
									
										6
									
								
								Makefile
									
									
									
									
									
										Normal dosya
									
								
							
							
						
						
									
										6
									
								
								Makefile
									
									
									
									
									
										Normal dosya
									
								
							| @@ -0,0 +1,6 @@ | ||||
| GIT_COMMIT=$(shell git rev-list -1 HEAD) | ||||
| GIT_TAG=$(shell git tag --sort="-version:refname" | head -n 1) | ||||
| all: | ||||
| 	go build -ldflags "-X main.GitCommit=${GIT_COMMIT} -X main.GitTag=${GIT_TAG}" | ||||
|  | ||||
|  | ||||
							
								
								
									
										5
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								main.go
									
									
									
									
									
								
							| @@ -27,6 +27,9 @@ type HistoryEntry struct { | ||||
| 	timestamp time.Time | ||||
| } | ||||
|  | ||||
| var GitTag string | ||||
| var GitCommit string | ||||
|  | ||||
| func databaseLocation() string { | ||||
| 	envOverride := os.Getenv("HS9001_DB_PATH") | ||||
| 	if envOverride != "" { | ||||
| @@ -354,6 +357,8 @@ func main() { | ||||
| 		os.Exit(23) | ||||
| 	case "import": | ||||
| 		importFromStdin(conn) | ||||
| 	case "version": | ||||
| 		fmt.Fprintf(os.Stdout, "Git Tag: %s\nGit Commit: %s\n", GitTag, GitCommit) | ||||
| 	default: | ||||
| 		fmt.Fprintf(os.Stderr, "Error: Unknown subcommand '%s' supplied\n\n", cmd) | ||||
| 		printUsage() | ||||
|   | ||||
		Yeni konuda referans
	
	Bir kullanıcı engelle