reproduce.tt: Save the revCount when reproducing more than once
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
8e716ff062
commit
591acda6f9
|
@ -97,6 +97,9 @@ if ! [ -d "$inputDir" ]; then
|
|||
revCount="$(cd "$inputDirTmp" && (git rev-list '[% input.revision %]' | wc -l))"
|
||||
rm -rf "$inputDirTmp/.git"
|
||||
mv "$inputDirTmp" "$inputDir"
|
||||
echo -n $revCount > "$tmpDir/[% input.name %]/revCount"
|
||||
else
|
||||
revCount="$(cat "$tmpDir/[% input.name %]/revCount")"
|
||||
fi
|
||||
|
||||
args+=(--arg '[% input.name %]' "{ outPath = $inputDir; rev = \"[% input.revision %]\"; shortRev = \"[% input.revision.substr(0, 7) %]\"; revCount = \"$revCount\"; }")
|
||||
|
@ -116,6 +119,9 @@ if ! [ -d "$inputDir" ]; then
|
|||
revCount="$(cd "$inputDirTmp" && (hg log -r '[% input.revision %]' --template "{rev}"))"
|
||||
rm -rf "$inputDirTmp/.hg"
|
||||
mv "$inputDirTmp" "$inputDir"
|
||||
echo -n $revCount > "$tmpDir/[% input.name %]/revCount"
|
||||
else
|
||||
revCount="$(cat "$tmpDir/[% input.name %]/revCount")"
|
||||
fi
|
||||
|
||||
args+=(--arg '[% input.name %]' "{ outPath = $inputDir; rev = \"[% input.revision %]\"; revCount = \"$revCount\"; }")
|
||||
|
|
Loading…
Reference in a new issue