Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change setup for interactive terminals
Browse files Browse the repository at this point in the history
ahosgood committed Jan 13, 2025
1 parent 813eee3 commit f672a87
Showing 7 changed files with 40 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cleanup-branches.yml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ on:

jobs:
delete:
if: github.event.ref_type == 'branch' && startsWith(github.event.ref, 'feature/')
if: github.event.ref_type == 'branch' && (startsWith(github.event.ref, 'feature/') ||startsWith(github.event.ref, 'fix/'))
runs-on: ubuntu-latest
strategy:
matrix:
32 changes: 30 additions & 2 deletions docker/tna-python-dev/bin/dev
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ poetry install --no-root --with dev || true

if [ -f "/app/package.json" ]
then
. tna-nvm
tna-nvm
npm install -g [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
npm install
fi
@@ -16,4 +16,32 @@ then
chmod +x -fR /home/app/.local/bin/tasks
fi

welcome
echo " ,--. ,--. .-------------------------------."
echo " ((O ))--((O )) | |"
echo " ,'_\`--'____\`--'_\`. | Awaiting your command... |"
echo " _: ____________ :_ | Run \"help\" to get started |"
echo " | | ||::::::::::|| | | | |"
echo " | | ||::::::::::|| | | | .-----------------------------'"
echo " |_| |/__________\\| |_| |/"
echo " |________________|"
echo " __..-' \`-..__"
echo " .-| : .----------------. : |-."
echo " ,\\ || | |\\______________/| | || /."
echo " /\`.\\:| | || __ __ __ || | |;/,'\\"
echo " :\`-._\\;.| || '--''--''--' || |,:/_.-':"
echo " | : | || .----------. || | : |"
echo " | | | || '- TNABOT -' || | | |"
echo " | | | || _ _ _ || | | |"
echo " :,--.; | || (_) (_) (_) || | :,--.;"
echo " (\`-'|) | ||______________|| | (|\`-')"
echo " \`--' | |/______________\\| | \`--'"
echo " |____________________|"
echo " \`.________________,'"
echo " (_______)(_______)"
echo " (_______)(_______)"
echo " (_______)(_______)"
echo " (_______)(_______)"
echo " | || |"
echo " '--------''--------'"

tail -f /dev/null
2 changes: 1 addition & 1 deletion docker/tna-python-dev/bin/format
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ else
fi
echo

. tna-nvm
tna-nvm
npm --version

echo "Running prettier..."
2 changes: 1 addition & 1 deletion docker/tna-python-dev/bin/upgrade
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ then
if [ -f "/app/package.json" ]
then
echo "Upgrading npm dependencies..."
. tna-nvm
tna-nvm
npm update
else
echo "package.json does not exist"
31 changes: 0 additions & 31 deletions docker/tna-python-dev/bin/welcome

This file was deleted.

2 changes: 1 addition & 1 deletion docker/tna-python/bin/tna-node
Original file line number Diff line number Diff line change
@@ -17,6 +17,6 @@ then
exit 1
fi

. tna-nvm
tna-nvm
npm install
npm run "$1"
17 changes: 6 additions & 11 deletions docker/tna-python/bin/tna-nvm
Original file line number Diff line number Diff line change
@@ -2,16 +2,11 @@

set -e

if ! type npm &> /dev/null
if [ -f "/app/.nvmrc" ]
then
[[ -z $NODE_ENV ]] && NODE_ENV=$ENVIRONMENT
. "$NVM_DIR/nvm.sh" && true
if [ -f "/app/.nvmrc" ]
then
NVM_NODE_VERSION=$(cat /app/.nvmrc)
nvm install "$NVM_NODE_VERSION"
nvm use "$NVM_NODE_VERSION" --silent
else
nvm use default --silent
fi
NVM_NODE_VERSION=$(cat /app/.nvmrc)
nvm install "$NVM_NODE_VERSION"
nvm use "$NVM_NODE_VERSION" --silent
else
nvm use default --silent
fi

0 comments on commit f672a87

Please sign in to comment.