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
ff81ec8c
Commit
ff81ec8c
authored
6 years ago
by
Mark OLESEN
Committed by
Andrew Heather
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
CONFIG: add -no-patch option for foamPackRelease
- if desired to create a tar-file without a _patch value in its name.
parent
36948486
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/tools/foamPackRelease
+14
-7
14 additions, 7 deletions
bin/tools/foamPackRelease
with
14 additions
and
7 deletions
bin/tools/foamPackRelease
+
14
−
7
View file @
ff81ec8c
...
@@ -48,6 +48,7 @@ Usage: ${0##*/} [OPTION] commit-ish
...
@@ -48,6 +48,7 @@ Usage: ${0##*/} [OPTION] commit-ish
options:
options:
-output DIR Specify alternative output directory
-output DIR Specify alternative output directory
-no-modules Exclude submodules
-no-modules Exclude submodules
-no-patch Ignore _patch number for the output tar-file
-compress=TYPE Compress with specified type
-compress=TYPE Compress with specified type
-tgz Alias for -compress=tgz
-tgz Alias for -compress=tgz
-help Print help
-help Print help
...
@@ -79,7 +80,7 @@ die()
...
@@ -79,7 +80,7 @@ die()
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
outputDir
=
"."
outputDir
=
"."
withModules
=
true
unset
skipModules skipPatchNum
unset
gitbase
head
commit compress
unset
gitbase
head
commit compress
while
[
"$#"
-gt
0
]
while
[
"$#"
-gt
0
]
...
@@ -94,7 +95,10 @@ do
...
@@ -94,7 +95,10 @@ do
shift
shift
;;
;;
-no-modules
)
-no-modules
)
unset
withModules
skipModules
=
true
;;
-no-patch
)
skipPatchNum
=
true
;;
;;
-compress
=
*
)
-compress
=
*
)
compress
=
"
${
1
#*=
}
"
compress
=
"
${
1
#*=
}
"
...
@@ -187,9 +191,12 @@ echo "Detected api, patch as '$api' and '$patch'" 1>&2
...
@@ -187,9 +191,12 @@ echo "Detected api, patch as '$api' and '$patch'" 1>&2
dirPrefix
=
"OpenFOAM-v
${
api
}
"
dirPrefix
=
"OpenFOAM-v
${
api
}
"
tarName
=
"OpenFOAM-v
${
api
}
"
tarName
=
"OpenFOAM-v
${
api
}
"
if
[
"
${
patch
:-
0
}
"
-gt
0
]
if
[
"
$skipPatchNum
"
=
true
]
then
echo
"Ignoring patch number for output name"
1>&2
elif
[
"
${
patch
:-
0
}
"
-gt
0
]
then
then
tarName
=
"
${
tarName
}
_
$patch
"
tarName
=
"
${
tarName
}
_
$
{
patch
}
"
fi
fi
echo
1>&2
echo
1>&2
...
@@ -224,7 +231,7 @@ echo 'git ls-tree -r "$head" >> "$outputDir/$manifest"'
...
@@ -224,7 +231,7 @@ echo 'git ls-tree -r "$head" >> "$outputDir/$manifest"'
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Add in mpdules
# Add in mpdules
if
[
"
$
with
Modules
"
=
true
]
if
[
"
$
skip
Modules
"
!
=
true
]
then
then
git
--git-dir
=
"
$gitbase
/.git"
ls-tree
"
$head
"
modules/ |
\
git
--git-dir
=
"
$gitbase
/.git"
ls-tree
"
$head
"
modules/ |
\
while
read
mode gittype sha1 module
while
read
mode gittype sha1 module
...
@@ -249,7 +256,7 @@ then
...
@@ -249,7 +256,7 @@ then
echo
'tar -Af "$outputDir/$tarName.tar" "$outputDir/$tarModule.tar"'
echo
'tar -Af "$outputDir/$tarName.tar" "$outputDir/$tarModule.tar"'
echo
'rm -f "$outputDir/$tarModule.tar"'
echo
'rm -f "$outputDir/$tarModule.tar"'
echo
"
popd
"
echo
'
popd
'
echo
echo
done
done
fi
fi
...
@@ -263,7 +270,7 @@ echo "echo 'Adding manifest'"
...
@@ -263,7 +270,7 @@ echo "echo 'Adding manifest'"
echo
'pushd "$outputDir"'
echo
'pushd "$outputDir"'
echo
"tar --append --transform='s|@|/|g' -v -f
\"\$
tarName.tar
\"
\"\$
manifest
\"
"
echo
"tar --append --transform='s|@|/|g' -v -f
\"\$
tarName.tar
\"
\"\$
manifest
\"
"
echo
'rm -f "$manifest"'
echo
'rm -f "$manifest"'
echo
"
popd
"
echo
'
popd
'
echo
echo
echo
"# End of creating archive"
echo
"# End of creating archive"
...
...
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