Code Review
/
ric-plt
/
lib
/
rmr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Correct whitespaces in sample message
[ric-plt/lib/rmr.git]
/
ci
/
ci_build.ksh
diff --git
a/ci/ci_build.ksh
b/ci/ci_build.ksh
index
31c821c
..
9ee710d
100644
(file)
--- a/
ci/ci_build.ksh
+++ b/
ci/ci_build.ksh
@@
-42,17
+42,19
@@
# Date: 14 June 2019
# --------------------------------------------------------------------------------
# Date: 14 June 2019
# --------------------------------------------------------------------------------
-# stash a set of packages for a particular flavour ($1)
+# stash a set of packages for a particular flavour ($1). Records what was kept
+# in a yaml file for an external process to grab, and in a simple publication
+# list for our internal publish script to gobble up.
#
function stash_pkgs {
#
function stash_pkgs {
- echo " - $1:" >>$yaml_file # add package flavour (dev, runtime, etc)
+ mkdir -p $target_dir/exported
for pkg in deb rpm
do
ls .build/*.$pkg 2>/dev/null | while read f
do
for pkg in deb rpm
do
ls .build/*.$pkg 2>/dev/null | while read f
do
- cp $f $target_dir/${f##*/}
- echo "
$pkg: $target_dir
/${f##*/}" >>$yaml_file
+ cp $f $target_dir/
exported/
${f##*/}
+ echo "
- $target_dir/exported
/${f##*/}" >>$yaml_file
done
done
done
done
@@
-72,6
+74,7
@@
do
*) echo "$1 is not recognised"
echo ""
echo "usage: $0 [-t target-dir]"
*) echo "$1 is not recognised"
echo ""
echo "usage: $0 [-t target-dir]"
+ echo " target dir defaults to /tmp and is where packages and lists are placed."
exit 1
;;
esac
exit 1
;;
esac
@@
-81,8
+84,11
@@
done
if [[ ! -d $target_dir ]]
then
if [[ ! -d $target_dir ]]
then
- echo "[FAIL] cannot find directory: $target_dir"
- exit 1
+ if ! -mkdir -p $target_dir
+ then
+ echo "[FAIL] cannot find or create target directory: $target_dir"
+ exit 1
+ fi
fi
if [[ ! -d ./ci ]] # verify we are in the root of the RMr repo filesystem, abort if not
fi
if [[ ! -d ./ci ]] # verify we are in the root of the RMr repo filesystem, abort if not
@@
-106,19
+112,10
@@
mkdir -p .build
cd test # execute tests
ksh unit_test.ksh # unit tests first
cd app_test
cd test # execute tests
ksh unit_test.ksh # unit tests first
cd app_test
- ksh run_all.
ksh
# application based tests if units pass
+ ksh run_all.
sh
# application based tests if units pass
)
)
-# initialise the yaml file
-cat <<-endKat >$yaml_file
----
-# package types which might be listed below
-pkg_types:
- - deb
- - rpm
-
-packages:
-endKat
+printf "---\nfiles:\n" >$yaml_file # initialise the yaml file
stash_pkgs development # testing good, stash dev packages built above
stash_pkgs development # testing good, stash dev packages built above