Skip to content

Commit

Permalink
chore: add more logs to the publish script
Browse files Browse the repository at this point in the history
Signed-off-by: Valeriy Svydenko <[email protected]>
  • Loading branch information
svor committed Feb 5, 2024
1 parent 2f7cb6b commit 374b7c8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions build/dev/publish-plugin-registry-to-gh-pages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ set -e

DEFAULT_BUILD_DIR="/projects/che-plugin-registry/output"
BUILD_DIR=${BUILD_DIR:-$DEFAULT_BUILD_DIR}
echo "BUILD_DIR: $BUILD_DIR"
ls -l "$BUILD_DIR"

DEFAULT_GH_PAGES_DIR="/projects/gh-pages"
GH_PAGES_DIR=${GH_PAGES_DIR:-$DEFAULT_GH_PAGES_DIR}
Expand All @@ -25,21 +27,25 @@ GITHUB_REPOSITORY=${GITHUB_REPOSITORY:-$DEFAULT_GITHUB_REPOSITORY}

DEFAULT_VERSION_DIR="next"
VERSION_DIR=${VERSION_DIR:-$DEFAULT_VERSION_DIR}
echo "VERSION_DIR: $VERSION_DIR"

rm "$GH_PAGES_DIR" -rf;
mkdir "$GH_PAGES_DIR"
cd "$GH_PAGES_DIR"
echo "GH Pages dir: $(pwd)"
ls -l "$GH_PAGES_DIR"

rm -rf che-plugin-registry
git clone -b gh-pages "https://github.com/$GITHUB_REPOSITORY.git" "$GITHUB_REPO_NAME"
cd "$GITHUB_REPO_NAME"
[ -d "$VERSION_DIR" ] && git rm -r "$VERSION_DIR"
cp -rf "$BUILD_DIR" "$VERSION_DIR"
# Make meta.yaml as index
# Make devfile.yaml as index
while IFS= read -r -d '' file
do
PARENT_DIR=$(dirname "$file");
cp "${PARENT_DIR}"/meta.yaml "${PARENT_DIR}"/index.json;
done < <(find . -name 'meta.yaml' -type f -print0)
cp "${PARENT_DIR}"/devfile.yaml "${PARENT_DIR}"/index.json;
done < <(find . -name 'devfile.yaml' -type f -print0)
git add "$VERSION_DIR"
git config user.email "[email protected]"
git config user.name "CHE Bot"
Expand Down

0 comments on commit 374b7c8

Please sign in to comment.