Create "publish_dir" symlink & CONTEXT

Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: Id573effe4c4c0969f08ea2f8185b6c90e403d433
This commit is contained in:
Davlet Panech 2022-08-30 20:47:19 -04:00
parent 70b5f57491
commit c2026d4cee
1 changed files with 26 additions and 0 deletions

View File

@ -59,4 +59,30 @@ if [[ -f "$BUILD_HOME/NEED_BUILD" ]] ; then
# copy changelog etc files
find_changelog_files | xargs -r cp -v -t "$BUILD_OUTPUT_HOME"
check_pipe_status
# CONTEXT
(
set -e
cd "$REPO_ROOT"
(
set -e
echo .repo/manifests
repo forall -c 'echo $REPO_PATH'
) | while read gitdir ; do
rev="$(cd "$gitdir" && git rev-parse HEAD)" || exit 1
echo "(cd "$gitdir" && git checkout -f ${rev})"
done
check_pipe_status
) >"$BUILD_OUTPUT_HOME/CONTEXT"
check_pipe_status
# PUBLISH_DIR
mkdir -p "$PUBLISH_DIR"
mkdir -p "$PUBLISH_DIR/outputs"
cp "$BUILD_OUTPUT_HOME/CHANGELOG" "$PUBLISH_DIR/outputs/CHANGELOG.txt"
cp "$BUILD_OUTPUT_HOME/CONTEXT" "$PUBLISH_DIR/outputs/CONTEXT.sh"
if ! same_path "$BUILD_OUTPUT_ROOT" "$PUBLISH_ROOT" ; then
ln -s "$PUBLISH_DIR" "$BUILD_OUTPUT_HOME/publish_dir"
fi
fi