Victor Lacasse-Beaudoin
6c97a670c6
Affiche la version de l'exécutable tel que défini at build time. Autres changements: - [DOCKERFILE] Ajouter `ARG agecem_org_version` - [FEATURE] Ajouter package version/ - [DOCKERFILE] `ADD version/` - [DOCKERFILE] Retirer installsuffix de build step - [DOCKERFILE] Utiliser `agecem_org_version` pour remplir version.version dans l'exécutabe - [DOCKERFILE] Nommer deuxième stage `run` - [DOCKER-COMPOSE] Standardiser valeurs
21 lines
400 B
Go
21 lines
400 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"git.agecem.com/agecem/agecem-org/version"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// versionCmd represents the version command
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Print version registered at build time",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Println("agecem-org", version.Version())
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(versionCmd)
|
|
}
|