File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ var versionCmd = &cobra.Command{
12
12
Short : "version" ,
13
13
Long : "version" ,
14
14
RunE : func (cmd * cobra.Command , args []string ) error {
15
- version := lunchpail .Version ()
16
- if assembly .IsAssembled () {
17
- version = assembly .AppVersion ()
15
+ if assembly .IsAssembled () && assembly .AppVersion () != "" {
16
+ fmt .Printf ("Application Version: %s\n " , assembly .AppVersion ())
18
17
}
19
18
20
- fmt .Printf ("%s\n " , version )
19
+ fmt .Printf (" Lunchpail Version: %s\n " , lunchpail .Version ())
20
+
21
21
return nil
22
22
},
23
23
}
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ if [[ -d "$2" ]] && [[ -f "$2"/version ]]
77
77
then
78
78
# Check that app version passes through
79
79
expectedAppVersion=$( cat " $2 " /version)
80
- actualAppVersion=$( $testapp version)
80
+ actualAppVersion=$( $testapp version | grep ' Application Version ' | awk ' {print $NF} ' )
81
81
if [[ " $expectedAppVersion " = " $actualAppVersion " ]]
82
82
then echo " ✅ PASS App Version passthrough $expectedAppVersion "
83
83
else echo " ❌ FAIL App Version passthrough expected!=actual '$expectedAppVersion '!='$actualAppVersion '" && exit 1
You can’t perform that action at this time.
0 commit comments