Skip to content

Commit

Permalink
make_version: Fix check for '.version' file
Browse files Browse the repository at this point in the history
When building from the non-git tree and with '.version' file missing,
make_version shows this bash error message.

% make
...
cat: .version: No such file or directory
...
error You need to set SKIBOOT_VERSION environment variable

This patch fixes this issue by updating '.version' file check in
make_version script to test if it exists as a regular file and is
of non-zero size.

Fixes: 6a3cad2("Add fallback to .version if not git and no SKIBOOT_VERSION")
Signed-off-by: Vaibhav Jain <[email protected]>
Signed-off-by: Stewart Smith <[email protected]>
  • Loading branch information
vaibhav92 authored and stewartsmith committed Nov 22, 2017
1 parent ba540e0 commit 646dbfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion make_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ else
then
echo $SKIBOOT_VERSION
else
if [ ! -z "`cat .version`" ];
if [ -f ".version" -a -s ".version" ];
then
cat .version
else
Expand Down

0 comments on commit 646dbfb

Please sign in to comment.