Code Review
/
releng
/
global-jjb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
CI: Change conclusion getter
[releng/global-jjb.git]
/
shell
/
package-listing.sh
diff --git
a/shell/package-listing.sh
b/shell/package-listing.sh
old mode 100644
(file)
new mode 100755
(executable)
index
266dbbe
..
c0b5476
--- a/
shell/package-listing.sh
+++ b/
shell/package-listing.sh
@@
-28,8
+28,7
@@
DIFF_PACKAGES=/tmp/packages_diff.txt
# Swap to creating END_PACKAGES if we are running in a CI job (determined by if
# we have a workspace env) or if the starting packages listing already exists.
PACKAGES="${START_PACKAGES}"
# Swap to creating END_PACKAGES if we are running in a CI job (determined by if
# we have a workspace env) or if the starting packages listing already exists.
PACKAGES="${START_PACKAGES}"
-if ( [ "${workspace}" ] || [ -f "${START_PACKAGES}" ] )
-then
+if [ "${workspace}" ] || [ -f "${START_PACKAGES}" ]; then
PACKAGES="${END_PACKAGES}"
fi
PACKAGES="${END_PACKAGES}"
fi
@@
-47,15
+46,14
@@
case "${OS_FAMILY}" in
;;
esac
;;
esac
-if [ -f "${START_PACKAGES}" ]
-then
- diff "${START_PACKAGES}" "${END_PACKAGES}" > "${DIFF_PACKAGES}"
+if [ -f "${START_PACKAGES}" ]
&& [ -f "${END_PACKAGES}" ]; then
+ # ` || true` Ignore exit code because diff exits 1 when there is a diff
+ diff "${START_PACKAGES}" "${END_PACKAGES}" > "${DIFF_PACKAGES}"
|| true
fi
# If running in a Jenkins job, then copy the created files to the archives
# location
fi
# If running in a Jenkins job, then copy the created files to the archives
# location
-if [ "${workspace}" ]
-then
+if [ "${workspace}" ]; then
mkdir -p "${workspace}/archives/"
cp -f /tmp/packages_*.txt "${workspace}/archives/"
fi
mkdir -p "${workspace}/archives/"
cp -f /tmp/packages_*.txt "${workspace}/archives/"
fi