Skip to content

Commit

Permalink
Set up nvm to export from script
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Jan 13, 2025
1 parent e33b385 commit 813eee3
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
branches:
- main
- feature/**
- fix/**
paths:
- .github/**
- docker/**
Expand Down
5 changes: 3 additions & 2 deletions docker/tna-python-dev/bin/dev
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ poetry install --no-root --with dev || true

if [ -f "/app/package.json" ]
then
tna-npm install -g [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
tna-npm install
. tna-nvm
npm install -g [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
npm install
fi

if [ -d "/home/app/.local/bin/tasks" ]
Expand Down
3 changes: 2 additions & 1 deletion docker/tna-python-dev/bin/format
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ else
fi
echo

tna-npm --version
. tna-nvm
npm --version

echo "Running prettier..."
prettier --write /app
Expand Down
3 changes: 0 additions & 3 deletions docker/tna-python-dev/bin/help
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ echo ""
echo "tna-node"
echo " Run a Node command from your package.json"
echo ""
echo "tna-npm"
echo " Run a command for npm that uses the correct version of Node"
echo ""
echo "secret-key"
echo " Generate a string that can be used as the environment variable SECRET_KEY"
echo ""
Expand Down
3 changes: 2 additions & 1 deletion docker/tna-python-dev/bin/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ then
if [ -f "/app/package.json" ]
then
echo "Upgrading npm dependencies..."
tna-npm update
. tna-nvm
npm update
else
echo "package.json does not exist"
fi
Expand Down
5 changes: 3 additions & 2 deletions docker/tna-python/bin/tna-node
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ then
exit 1
fi

tna-npm install
tna-npm run "$1"
. tna-nvm
npm install
npm run "$1"
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ then
nvm use default --silent
fi
fi

npm "$@"

0 comments on commit 813eee3

Please sign in to comment.