agecem-org/version/version.go
Victor Lacasse-Beaudoin 6c97a670c6 Ajouter version subcommand
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
2023-11-13 16:49:20 -05:00

19 lines
382 B
Go

package version
// Filled by build flag
var version string
/*
Version returns the application version
Example command to use the output of `git describe` for version number at build time:
$ go build -ldflags="-X 'git.agecem.com/agecem/agecem-org/version.version=`git describe`'" .
*/
func Version() string {
if version == "" {
return "version unknown"
}
return version
}