Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ide/docopts.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ OpenServerless Ide Development Utilities.

```text
Usage:
ide login [<username>] [<apihost>]
ide login [<username>] [<apihost>] [--pin]
ide devel [--fast] [--dry-run]
ide deploy [<action>|--packages|--web] [--dry-run]
ide undeploy [<action>] [--dry-run]
ide clean
ide setup
ide setup
ide serve
ide poll
ide shell
Expand Down Expand Up @@ -60,8 +60,9 @@ Usage:
## Options

```
--dry-run Simulates the execution without making any actual changes
--dry-run Simulates the execution without making any actual changes
--packages Only deploy packages, skip web upload
--web Only deploy web folder, skip packages
--fast Skip the initial deployment step and go in incremental update mode
--pin Pin the current auth in the .env to check you are not deploying on the wrong user
```
3 changes: 1 addition & 2 deletions ide/nodejs/build-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
DIR="${1:?directory}"
ZIP="${2:?zip file}"
cd "$DIR"
npm install
touch node_modules/.package-lock.json
bun install
if test -f "$ZIP"
then rm "$ZIP"
fi
Expand Down
13 changes: 8 additions & 5 deletions ide/opsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ tasks:
You can then use 'ops ide devel' and 'ops ide deploy'.
You can also reopen the project with VSCode and use the command 'Reopen in Container'.
cmds:
- test -e "/.dockerenv" || die "{{.MSG}}"
- test "$(python3 -V | awk -F. '{print $2}')" -ge 10 || die "python 3.10 or greater not available"
- test -x "$(which virtualenv)" || die "you need python virtualenv"
- test "$(node -v | awk -F. '{print substr($1,2) }')" -ge 18 || die "nodejs 18 or greater not available"
- test "$(printf '%s\n' "$(bun -v)" "1.1.18" | sort -V | head -n 1)" = "1.1.18" || die "bun 1.1.18 or greater not available"
- test -d "$OPS_PWD/packages" || die "no packages in current directory"
- test -e ~/.wskprops || die "please run 'ops ide login' first"
Expand Down Expand Up @@ -141,7 +137,7 @@ tasks:


login:
silent: true
silent: false
desc: login in you OpenServerless host
cmds:
- |
Expand Down Expand Up @@ -197,6 +193,13 @@ tasks:
config OPSDEV_HOST="$OPSDEV_HOST_PROT://$OPSDEV_USERNAME.$OPSDEV_HOST_URL"
source ~/.wskprops
fi
if {{.__pin}}
then
touch $OPS_PWD/.env
mv $OPS_PWD/.env $OPS_PWD/.env.$$
cat $OPS_PWD/.env.$$ | rg -v "AUTH_CHECK=" >$OPS_PWD/.env || true
echo "AUTH_CHECK=$AUTH" >>$OPS_PWD/.env
fi



Expand Down
8 changes: 2 additions & 6 deletions ide/python/build-venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,9 @@ DIR="${1:?directory}"
ZIP="${2:?zip file}"
cd "$DIR"
if ! test -d virtualenv
then virtualenv virtualenv
then uv venv virtualenv --python=/usr/bin/python3
fi
source virtualenv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
virtualenv/bin/python -m pip uninstall -y -q setuptools wheel pip
touch virtualenv/bin/activate
uv pip install --python=virtualenv/bin/python -r requirements.txt
if test -f "$ZIP"
then rm "$ZIP"
fi
Expand Down
17 changes: 17 additions & 0 deletions ide/python/installer.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"folders": [
{
"path": "../../.."
},
{
"path": "../../../../python-starter"
}
],
"settings": {
"workbench.colorCustomizations": {
"activityBar.background": "#5A0F2E",
"titleBar.activeBackground": "#7E1541",
"titleBar.activeForeground": "#FEFBFD"
}
}
}
4 changes: 2 additions & 2 deletions ide/util/opsfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ tasks:
then $OPS ide python zip DIR="$($OPS -opspath "packages/{{.A}}")"
elif test -e "packages/{{.A}}/package.json"
then $OPS ide nodejs zip DIR="$($OPS -opspath "packages/{{.A}}")"
else echo "no zip environment"
else true #echo "no zip environment"
fi

action:
desc: build an action filling its zip file
desc: build an action filling its zip file
silent: true
requires: { vars: [A]}
cmds:
Expand Down