You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ide/opsfile.yml
+48-33Lines changed: 48 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ vars:
22
22
API_HOST:
23
23
sh: |
24
24
echo "http://localhost:80"
25
-
25
+
26
26
DEPLOY_CURRENT_HASH:
27
27
sh: |
28
28
if test -e "$OPS_ROOT/ide/deploy/bun.lockb"
@@ -36,12 +36,12 @@ vars:
36
36
then cat "$OPS_ROOT/ide/deploy/hash.lock"
37
37
else echo "0"
38
38
fi
39
-
39
+
40
40
tasks:
41
41
42
42
prereq:
43
43
silent: true
44
-
vars:
44
+
vars:
45
45
MSG: |
46
46
This command must be run inside a devcontainer.
47
47
Please use 'ops ide devcontainer' to create a configuration and enter in a devcontainer.
@@ -59,31 +59,31 @@ tasks:
59
59
- test "$(ops -wsk property get --namespace | awk '{ print $3 }')" = "$OPSDEV_USERNAME" || die "Repeat the login"
60
60
- |
61
61
if ! test -d "$OPS_ROOT/ide/deploy/node_modules" || [ "{{.DEPLOY_CURRENT_HASH}}" != "{{.DEPLOY_PREVIOUS_HASH}}" ]
62
-
then
62
+
then
63
63
cd $OPS_ROOT/ide/deploy && bun install && rm -f $OPS_ROOT/ide/deploy/hash.lock && bun $OPS_ROOT/ide/deploy/bun.lockb --hash > $OPS_ROOT/ide/deploy/hash.lock
64
64
fi
65
65
- |
66
66
if test -e "$OPS_PWD/package.json"
67
67
then if ! test -d "$OPS_PWD/node_modules"
68
68
then cd $OPS_PWD ; bun install
69
69
fi
70
-
fi
70
+
fi
71
71
- task: kill
72
-
72
+
73
73
devcontainer:
74
74
silent: true
75
75
desc: add a devcontainer to your project
76
76
cmds:
77
77
- |
78
78
if test -e "$OPS_PWD/.devcontainer/devcontainer.json"
79
79
then echo "a .devcontainer already exists"
80
-
else
80
+
else
81
81
mkdir -p "$OPS_PWD/.devcontainer"
82
82
cp devcontainer.json "$OPS_PWD/.devcontainer/"
83
83
echo "devcontainer created in .devcontainer - please use VSCode and the command 'Reopen in Container'"
84
84
fi
85
85
- |
86
-
if echo "$OPS_PWD/" | rg ' '
86
+
if echo "$OPS_PWD/" | rg ' '
87
87
then die "please place your workspace in a folder WITHOUT SPACES IN THE FOLDER NAME!!!!"
88
88
fi
89
89
- bun x @devcontainers/cli up --workspace-folder "$OPS_PWD"
@@ -98,22 +98,22 @@ tasks:
98
98
PIDFILE=$(ops -opspath ~/.ops/tmp/deploy.pid)
99
99
echo $PIDFILE
100
100
if test -e $PIDFILE
101
-
then
101
+
then
102
102
PID=$(cat $PIDFILE)
103
103
104
104
if [ ! -z "$PID" ]; then
105
105
if ps -p "$PID" > /dev/null;
106
106
then
107
107
echo "Found previous deploy pid: $PID"
108
108
kill "$PID"
109
-
# PGRP=$(ps -o 'pgid=' -p $PID | xargs)
109
+
# PGRP=$(ps -o 'pgid=' -p $PID | xargs)
110
110
# if [ ! -z "$PGRP" ];
111
-
# then
111
+
# then
112
112
# echo "Terminating deploy process group $PGRP"
113
113
# kill "$PGRP"
114
114
# else
115
115
# echo "Terminating deploy process $PID"
116
-
# kill "$PID"
116
+
# kill "$PID"
117
117
# fi
118
118
fi
119
119
fi
@@ -153,7 +153,7 @@ tasks:
153
153
fi
154
154
echo "*** Configuring Access to OpenServerless ***"
0 commit comments