-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add more logs to the publish script
Signed-off-by: Valeriy Svydenko <[email protected]>
- Loading branch information
Showing
1 changed file
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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} | ||
|
@@ -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" | ||
|