Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Commits
677a2a8d
Commit
677a2a8d
authored
14 years ago
by
Mark Olesen
Browse files
Options
Downloads
Patches
Plain Diff
STYLE: minor cleanup in wmakePrintBuild
parent
808ff1aa
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wmake/wmakePrintBuild
+23
-8
23 additions, 8 deletions
wmake/wmakePrintBuild
with
23 additions
and
8 deletions
wmake/wmakePrintBuild
+
23
−
8
View file @
677a2a8d
...
@@ -29,6 +29,9 @@
...
@@ -29,6 +29,9 @@
# Print the version used when building the project
# Print the version used when building the project
#
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# persistent build tag
build
=
"
$WM_PROJECT_DIR
/.build"
usage
()
{
usage
()
{
exec
1>&2
exec
1>&2
...
@@ -41,6 +44,7 @@ options:
...
@@ -41,6 +44,7 @@ options:
-major report
\$
WM_PROJECT_VERSION only and exit
-major report
\$
WM_PROJECT_VERSION only and exit
-update update
\$
WM_PROJECT_DIR/.build from the git information
-update update
\$
WM_PROJECT_DIR/.build from the git information
-pkg TAG specify packager/release tag ('none' marks an empty packager)
-pkg TAG specify packager/release tag ('none' marks an empty packager)
-short report short version information (ie, without pkg tag)
-version VER specify an alternative version
-version VER specify an alternative version
Print the version used when building the project, in this order of precedence:
Print the version used when building the project, in this order of precedence:
...
@@ -53,7 +57,7 @@ USAGE
...
@@ -53,7 +57,7 @@ USAGE
}
}
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
unset
checkOnly update package version
oldPackage oldVersion
unset
checkOnly update package version
shortOpt
# parse options
# parse options
while
[
"$#"
-gt
0
]
while
[
"$#"
-gt
0
]
...
@@ -80,6 +84,10 @@ do
...
@@ -80,6 +84,10 @@ do
package
=
$(
echo
"
${
2
:-
none
}
"
|
sed
-e
's/!//g'
)
package
=
$(
echo
"
${
2
:-
none
}
"
|
sed
-e
's/!//g'
)
shift
2
shift
2
;;
;;
-short
)
shortOpt
=
true
shift
;;
-v
|
-version
)
-v
|
-version
)
[
"$#"
-ge
2
]
||
usage
"'
$1
' option requires an argument"
[
"$#"
-ge
2
]
||
usage
"'
$1
' option requires an argument"
version
=
"
$2
"
version
=
"
$2
"
...
@@ -93,17 +101,11 @@ done
...
@@ -93,17 +101,11 @@ done
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
#
# persistent build tag
#
build
=
"
$WM_PROJECT_DIR
/.build"
unset
oldVersion oldPackage
#
#
# retrieve old values from the $WM_PROJECT_DIR/.build cache, stored as
# retrieve old values from the $WM_PROJECT_DIR/.build cache, stored as
# version [packager]
# version [packager]
#
#
unset
oldPackage oldVersion
getOldValues
()
getOldValues
()
{
{
set
--
$(
tail
-1
$build
2>/dev/null
)
set
--
$(
tail
-1
$build
2>/dev/null
)
...
@@ -157,6 +159,11 @@ fi
...
@@ -157,6 +159,11 @@ fi
# retrieve old values
# retrieve old values
getOldValues
getOldValues
if
[
"
$shortOpt
"
=
true
]
then
unset
package oldPackage
fi
#
#
# update persistent build tag if possible
# update persistent build tag if possible
#
#
...
@@ -171,6 +178,14 @@ then
...
@@ -171,6 +178,14 @@ then
fi
fi
fi
fi
# cat<< DEBUG 1>&2
# Debug information
# version='$version'
# package='$package'
# oldVersion='$oldVersion'
# oldPackage='$oldPackage'
# DEBUG
# check git vs. persistent build tag
# check git vs. persistent build tag
if
[
-n
"
$checkOnly
"
]
if
[
-n
"
$checkOnly
"
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment