mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Add automatic rules to manage version number
Former-commit-id: f4fcc1927f4169025c1d8cc88c5f3abcdc76037c
This commit is contained in:
@ -23,7 +23,6 @@ var _BatchSize = 5000
|
||||
var _Pprof = false
|
||||
var _Quality_Shift_Input = byte(33)
|
||||
var _Quality_Shift_Output = byte(33)
|
||||
var _Version = "4.2.1"
|
||||
|
||||
type ArgumentParser func([]string) (*getoptions.GetOpt, []string)
|
||||
|
||||
@ -77,7 +76,7 @@ func GenerateOptionParser(optionset ...func(*getoptions.GetOpt)) ArgumentParser
|
||||
}
|
||||
|
||||
if options.Called("version") {
|
||||
fmt.Fprintf(os.Stderr, "obitools version %s\n", _Version)
|
||||
fmt.Fprintf(os.Stderr, "OBITools %s\n", VersionString())
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
|
16
pkg/obioptions/version.go
Normal file
16
pkg/obioptions/version.go
Normal file
@ -0,0 +1,16 @@
|
||||
package obioptions
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
var _Commit = ""
|
||||
var _Version = "Release 4.2.0"
|
||||
|
||||
// Version returns the version of the obitools package.
|
||||
//
|
||||
// No parameters.
|
||||
// Returns a string representing the version of the obitools package.
|
||||
func VersionString() string {
|
||||
return fmt.Sprintf("%s (%s)", _Version, _Commit)
|
||||
}
|
Reference in New Issue
Block a user