nightly tarballs: compare the hashes to know if they're new
The filenames contain date/timestamps; if you compare those, the tarball generated every night will *always* be new. Instead, separate out the git hash from the old and new tarballs, and compare those. Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Этот коммит содержится в:
родитель
cad4c03e5c
Коммит
51def91003
@ -68,6 +68,8 @@ for branch in $branches; do
|
|||||||
echo "=== Branch: $branch"
|
echo "=== Branch: $branch"
|
||||||
# Get the last tarball version that was made
|
# Get the last tarball version that was made
|
||||||
prev_snapshot=`cat $outputroot/$branch/latest_snapshot.txt`
|
prev_snapshot=`cat $outputroot/$branch/latest_snapshot.txt`
|
||||||
|
prev_snapshot_hash=`echo $prev_snapshot | cut -d- -f3`
|
||||||
|
echo "=== Previous snapshot: $prev_snapshot (hash: $prev_snapshot_hash)"
|
||||||
|
|
||||||
# Form a URL-specific script name
|
# Form a URL-specific script name
|
||||||
script=$branch-`basename $script_uri`
|
script=$branch-`basename $script_uri`
|
||||||
@ -100,12 +102,19 @@ for branch in $branches; do
|
|||||||
module unload autotools
|
module unload autotools
|
||||||
echo "=== Done running script"
|
echo "=== Done running script"
|
||||||
|
|
||||||
# Did the script generate a new tarball? If so, save it so that we can
|
# Did the script generate a new tarball? Ensure to compare the
|
||||||
# spawn the coverity checker on it afterwards. Only for this for the
|
# only the hash of the previous tarball and the hash of the new
|
||||||
# master (for now).
|
# tarball (the filename also contains the date/timestamp, which
|
||||||
|
# will always be different).
|
||||||
|
|
||||||
|
# If so, save it so that we can spawn the coverity checker on it
|
||||||
|
# afterwards. Only for this for the master (for now).
|
||||||
latest_snapshot=`cat $outputroot/$branch/latest_snapshot.txt`
|
latest_snapshot=`cat $outputroot/$branch/latest_snapshot.txt`
|
||||||
echo "=== Latest snapshot: $latest_snapshot"
|
latest_snapshot_hash=`echo $latest_snapshot | cut -d- -f3`
|
||||||
if test "$prev_snapshot" != "$latest_snapshot"; then
|
echo "=== Latest snapshot: $latest_snapshot (hash: $latest_snapshot_hash)"
|
||||||
|
if test "$prev_snapshot_hash" = "$latest_snapshot_hash"; then
|
||||||
|
echo "=== Hash has not changed; no need to upload/save the new tarball"
|
||||||
|
else
|
||||||
if test "$branch" = "master"; then
|
if test "$branch" = "master"; then
|
||||||
echo "=== Saving output for a Coverity run"
|
echo "=== Saving output for a Coverity run"
|
||||||
echo "$outputroot/$branch/hwloc-$latest_snapshot.tar.bz2" >> $pending_coverity
|
echo "$outputroot/$branch/hwloc-$latest_snapshot.tar.bz2" >> $pending_coverity
|
||||||
|
@ -70,7 +70,8 @@ for branch in $branches; do
|
|||||||
echo "=== Branch: $branch"
|
echo "=== Branch: $branch"
|
||||||
# Get the last tarball version that was made
|
# Get the last tarball version that was made
|
||||||
prev_snapshot=`cat $outputroot/$branch/latest_snapshot.txt`
|
prev_snapshot=`cat $outputroot/$branch/latest_snapshot.txt`
|
||||||
echo "=== Previous snapshot: $prev_snapshot"
|
prev_snapshot_hash=`echo $prev_snapshot | cut -d- -f3`
|
||||||
|
echo "=== Previous snapshot: $prev_snapshot (hash: $prev_snapshot_hash)"
|
||||||
|
|
||||||
code_uri=$master_code_uri
|
code_uri=$master_code_uri
|
||||||
raw_uri=$master_raw_uri
|
raw_uri=$master_raw_uri
|
||||||
@ -105,12 +106,19 @@ for branch in $branches; do
|
|||||||
module unload autotools
|
module unload autotools
|
||||||
echo "=== Done running script"
|
echo "=== Done running script"
|
||||||
|
|
||||||
# Did the script generate a new tarball? If so, save it so that we can
|
# Did the script generate a new tarball? Ensure to compare the
|
||||||
# spawn the coverity checker on it afterwards. Only for this for the
|
# only the hash of the previous tarball and the hash of the new
|
||||||
# master (for now).
|
# tarball (the filename also contains the date/timestamp, which
|
||||||
|
# will always be different).
|
||||||
|
|
||||||
|
# If so, save it so that we can spawn the coverity checker on it
|
||||||
|
# afterwards. Only for this for the master (for now).
|
||||||
latest_snapshot=`cat $outputroot/$branch/latest_snapshot.txt`
|
latest_snapshot=`cat $outputroot/$branch/latest_snapshot.txt`
|
||||||
echo "=== Latest snapshot: $latest_snapshot"
|
latest_snapshot_hash=`echo $latest_snapshot | cut -d- -f3`
|
||||||
if test "$prev_snapshot" != "$latest_snapshot"; then
|
echo "=== Latest snapshot: $latest_snapshot (hash: $latest_snapshot_hash)"
|
||||||
|
if test "$prev_snapshot_hash" = "$latest_snapshot_hash"; then
|
||||||
|
echo "=== Hash has not changed; no need to upload/save the new tarball"
|
||||||
|
else
|
||||||
if test "$branch" = "master"; then
|
if test "$branch" = "master"; then
|
||||||
echo "=== Saving output for a Coverity run"
|
echo "=== Saving output for a Coverity run"
|
||||||
echo "$outputroot/$branch/openmpi-$latest_snapshot.tar.bz2" >> $pending_coverity
|
echo "$outputroot/$branch/openmpi-$latest_snapshot.tar.bz2" >> $pending_coverity
|
||||||
|
@ -69,7 +69,8 @@ for branch in $branches; do
|
|||||||
echo "=== Branch: $branch"
|
echo "=== Branch: $branch"
|
||||||
# Get the last tarball version that was made
|
# Get the last tarball version that was made
|
||||||
prev_snapshot=`cat $outputroot/$branch/latest_snapshot.txt`
|
prev_snapshot=`cat $outputroot/$branch/latest_snapshot.txt`
|
||||||
echo "=== Previous snapshot: $prev_snapshot"
|
prev_snapshot_hash=`echo $prev_snapshot | cut -d- -f3`
|
||||||
|
echo "=== Previous snapshot: $prev_snapshot (hash: $prev_snapshot_hash)"
|
||||||
|
|
||||||
if test "$branch" = "master"; then
|
if test "$branch" = "master"; then
|
||||||
code_uri=$master_code_uri
|
code_uri=$master_code_uri
|
||||||
@ -110,12 +111,19 @@ for branch in $branches; do
|
|||||||
module unload autotools
|
module unload autotools
|
||||||
echo "=== Done running script"
|
echo "=== Done running script"
|
||||||
|
|
||||||
# Did the script generate a new tarball? If so, save it so that we can
|
# Did the script generate a new tarball? Ensure to compare the
|
||||||
# spawn the coverity checker on it afterwards. Only for this for the
|
# only the hash of the previous tarball and the hash of the new
|
||||||
# master (for now).
|
# tarball (the filename also contains the date/timestamp, which
|
||||||
|
# will always be different).
|
||||||
|
|
||||||
|
# If so, save it so that we can spawn the coverity checker on it
|
||||||
|
# afterwards. Only for this for the master (for now).
|
||||||
latest_snapshot=`cat $outputroot/$branch/latest_snapshot.txt`
|
latest_snapshot=`cat $outputroot/$branch/latest_snapshot.txt`
|
||||||
echo "=== Latest snapshot: $latest_snapshot"
|
latest_snapshot_hash=`echo $latest_snapshot | cut -d- -f3`
|
||||||
if test "$prev_snapshot" != "$latest_snapshot"; then
|
echo "=== Latest snapshot: $latest_snapshot (hash: $latest_snapshot_hash)"
|
||||||
|
if test "$prev_snapshot_hash" = "$latest_snapshot_hash"; then
|
||||||
|
echo "=== Hash has not changed; no need to upload/save the new tarball"
|
||||||
|
else
|
||||||
if test "$branch" = "master"; then
|
if test "$branch" = "master"; then
|
||||||
echo "=== Saving output for a Coverity run"
|
echo "=== Saving output for a Coverity run"
|
||||||
echo "$outputroot/$branch/pmix-$latest_snapshot.tar.bz2" >> $pending_coverity
|
echo "$outputroot/$branch/pmix-$latest_snapshot.tar.bz2" >> $pending_coverity
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user