feat: use -version for version
	
		
			
	
		
	
	
				
					
				
			This commit is contained in:
		
							parent
							
								
									ff8f700506
								
							
						
					
					
						commit
						0826a3d14a
					
				|  | @ -39,7 +39,7 @@ jobs: | ||||||
|             - name: Build |             - name: Build | ||||||
|               run: make build |               run: make build | ||||||
|             - name: Version |             - name: Version | ||||||
|               run: ./build/joj3 -v |               run: ./build/joj3 -version | ||||||
|             - name: Test |             - name: Test | ||||||
|               run: | |               run: | | ||||||
|                   make prepare-test |                   make prepare-test | ||||||
|  |  | ||||||
|  | @ -40,7 +40,7 @@ var Version string | ||||||
| // Generally, err is used for runtime errors, and checkRes is used for the result of the checks.
 | // Generally, err is used for runtime errors, and checkRes is used for the result of the checks.
 | ||||||
| func main() { | func main() { | ||||||
| 	var gitWhitelist, metaFile, releaseTags []string | 	var gitWhitelist, metaFile, releaseTags []string | ||||||
| 	showVersion := flag.Bool("v", false, "print current version") | 	showVersion := flag.Bool("version", false, "print current version") | ||||||
| 	rootDir := flag.String("root", "", "") | 	rootDir := flag.String("root", "", "") | ||||||
| 	repo := flag.String("repo", "", "") | 	repo := flag.String("repo", "", "") | ||||||
| 	localList := flag.String("localList", "", "") | 	localList := flag.String("localList", "", "") | ||||||
|  |  | ||||||
|  | @ -100,7 +100,7 @@ var ( | ||||||
| func init() { | func init() { | ||||||
| 	flag.StringVar(&metaConfPath, "meta-conf", "meta-conf.toml", "meta config file path") | 	flag.StringVar(&metaConfPath, "meta-conf", "meta-conf.toml", "meta config file path") | ||||||
| 	flag.StringVar(&msg, "msg", "", "message to trigger the running, leave empty to use git commit message on HEAD") | 	flag.StringVar(&msg, "msg", "", "message to trigger the running, leave empty to use git commit message on HEAD") | ||||||
| 	showVersion = flag.Bool("v", false, "print current version") | 	showVersion = flag.Bool("version", false, "print current version") | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func mainImpl() error { | func mainImpl() error { | ||||||
|  |  | ||||||
|  | @ -12,7 +12,7 @@ import ( | ||||||
| var Version string | var Version string | ||||||
| 
 | 
 | ||||||
| func main() { | func main() { | ||||||
| 	showVersion := flag.Bool("v", false, "print current version") | 	showVersion := flag.Bool("version", false, "print current version") | ||||||
| 	score := flag.Int("score", 0, "score") | 	score := flag.Int("score", 0, "score") | ||||||
| 	flag.Parse() | 	flag.Parse() | ||||||
| 	if *showVersion { | 	if *showVersion { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user