Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
aalves08 committed Dec 5, 2024
1 parent e4988d3 commit adc4494
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/scripts/test-extensions-creators-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -eo pipefail

SKELETON_APP_NAME="test-pkg"


validate_tagged_extension_creator() {
TAG=$1
Expand All @@ -18,7 +20,7 @@ validate_tagged_extension_creator() {
source ~/.nvm/nvm.sh

DIR=$(mktemp -d)
pushd $DIR > /dev/null
cd $DIR

echo "*** ***************************************** ***"
echo "*** Verifying extension creator for tag ::: ${TAG} ***"
Expand All @@ -34,15 +36,14 @@ validate_tagged_extension_creator() {
nvm use ${NODE_VERSION}

# generate skeleton app
npm init @rancher/extension@${TAG} test-pkg --app-name test-app | cat

pushd test-pkg > /dev/null
npm init @rancher/extension@${TAG} ${SKELETON_APP_NAME} --app-name test-app | cat
cd ${SKELETON_APP_NAME}

# install dependencies
yarn install

# test build of pkg inside skeleton app
yarn build-pkg test-pkg | cat
yarn build-pkg ${SKELETON_APP_NAME} | cat

echo "=> Current dir 2:"
pwd
Expand All @@ -59,7 +60,7 @@ validate_tagged_extension_creator() {
git init
#when doing git init, we are sent to .git folder
cd ..
cd test-pkg
cd ${SKELETON_APP_NAME}

echo "=> Current dir 4:"
pwd
Expand All @@ -71,7 +72,7 @@ validate_tagged_extension_creator() {

yarn install

yarn build-pkg test-pkg | cat
yarn build-pkg ${SKELETON_APP_NAME} | cat

echo "*** ***************************************** ***"
echo "*** Testing UPGRADE from legacy-v2 to latest ***"
Expand All @@ -89,11 +90,11 @@ validate_tagged_extension_creator() {

yarn install

yarn build-pkg test-pkg | cat
yarn build-pkg ${SKELETON_APP_NAME} | cat
fi

echo "Cleaning temporary dir"
popd > /dev/null
cd ${DIR}

echo "Removing folder ${DIR}"
rm -rf ${DIR}
Expand Down

0 comments on commit adc4494

Please sign in to comment.