Skip to content

Commit 9704d8e

Browse files
ben-octo-data-devitsmebenwalker
authored andcommitted
Add npm package
1 parent 7f7a140 commit 9704d8e

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

step-templates/convex-deploy.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"Properties": {
1010
"Octopus.Action.Script.ScriptSource": "Inline",
1111
"Octopus.Action.Script.Syntax": "Bash",
12-
"Octopus.Action.Script.ScriptBody": "deployKey=$(get_octopusvariable \"ConvexDeploy.DeployKey\")\ndeploymentType=$(get_octopusvariable \"ConvexDeploy.DeploymentType\")\npreviewName=$(get_octopusvariable \"ConvexDeploy.PreviewName\")\nworkingDir=$(get_octopusvariable \"ConvexDeploy.WorkingDirectory\")\ncmdTimeout=$(get_octopusvariable \"ConvexDeploy.CommandTimeout\")\n\nif [ -z \"$deployKey\" ]; then\n echo \"ERROR: ConvexDeploy.DeployKey is required.\"\n exit 1\nfi\n\nif [ -z \"$deploymentType\" ]; then\n deploymentType=\"prod\"\nfi\n\nif [ -z \"$cmdTimeout\" ]; then\n cmdTimeout=\"300\"\nfi\n\nexport CONVEX_DEPLOY_KEY=\"$deployKey\"\n\nif [ -n \"$workingDir\" ]; then\n echo \"Changing to working directory: $workingDir\"\n cd \"$workingDir\" || { echo \"ERROR: Could not change to directory '$workingDir'\"; exit 1; }\nfi\n\necho \"Convex deployment type: $deploymentType\"\n\ncase \"$deploymentType\" in\n prod)\n echo \"Deploying to production...\"\n timeout \"$cmdTimeout\" npx convex deploy --yes\n ;;\n preview)\n if [ -z \"$previewName\" ]; then\n echo \"ERROR: ConvexDeploy.PreviewName is required when deployment type is 'preview'.\"\n exit 1\n fi\n echo \"Deploying to preview deployment: $previewName\"\n timeout \"$cmdTimeout\" npx convex deploy --preview-name \"$previewName\" --yes\n ;;\n dev)\n echo \"Deploying to dev deployment...\"\n timeout \"$cmdTimeout\" npx convex deploy --yes\n ;;\n *)\n echo \"ERROR: Unknown deployment type '$deploymentType'. Must be one of: prod, preview, dev\"\n exit 1\n ;;\nesac\n\nif [ $? -ne 0 ]; then\n echo \"ERROR: Convex deployment failed.\"\n exit 1\nfi\n\necho \"Convex deployment completed successfully.\"\n"
12+
"Octopus.Action.Script.ScriptBody": "deployKey=$(get_octopusvariable \"ConvexDeploy.DeployKey\")\ndeploymentType=$(get_octopusvariable \"ConvexDeploy.DeploymentType\")\npreviewName=$(get_octopusvariable \"ConvexDeploy.PreviewName\")\nworkingDir=$(get_octopusvariable \"ConvexDeploy.WorkingDirectory\")\ncmdTimeout=$(get_octopusvariable \"ConvexDeploy.CommandTimeout\")\n\nif [ -z \"$deployKey\" ]; then\n echo \"ERROR: ConvexDeploy.DeployKey is required.\"\n exit 1\nfi\n\nif [ -z \"$deploymentType\" ]; then\n deploymentType=\"prod\"\nfi\n\nif [ -z \"$cmdTimeout\" ]; then\n cmdTimeout=\"300\"\nfi\n\nexport CONVEX_DEPLOY_KEY=\"$deployKey\"\n\nif [ -n \"$workingDir\" ]; then\n echo \"Changing to working directory: $workingDir\"\n cd \"$workingDir\" || { echo \"ERROR: Could not change to directory '$workingDir'\"; exit 1; }\nfi\n\nensure_node() {\n if command -v npx &>/dev/null; then\n echo \"Node.js found: $(node --version)\"\n return 0\n fi\n export NVM_DIR=\"${NVM_DIR:-$HOME/.nvm}\"\n if [ -s \"$NVM_DIR/nvm.sh\" ]; then\n \\. \"$NVM_DIR/nvm.sh\"\n if command -v npx &>/dev/null; then\n echo \"Node.js loaded via nvm: $(node --version)\"\n return 0\n fi\n fi\n echo \"Node.js not found. Installing via nvm...\"\n curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash\n \\. \"$NVM_DIR/nvm.sh\"\n nvm install --lts\n echo \"Node.js installed: $(node --version)\"\n}\nensure_node\n\necho \"Convex deployment type: $deploymentType\"\n\ncase \"$deploymentType\" in\n prod)\n echo \"Deploying to production...\"\n timeout \"$cmdTimeout\" npx convex deploy --yes\n ;;\n preview)\n if [ -z \"$previewName\" ]; then\n echo \"ERROR: ConvexDeploy.PreviewName is required when deployment type is 'preview'.\"\n exit 1\n fi\n echo \"Deploying to preview deployment: $previewName\"\n timeout \"$cmdTimeout\" npx convex deploy --preview-name \"$previewName\" --yes\n ;;\n dev)\n echo \"Deploying to dev deployment...\"\n timeout \"$cmdTimeout\" npx convex deploy --yes\n ;;\n *)\n echo \"ERROR: Unknown deployment type '$deploymentType'. Must be one of: prod, preview, dev\"\n exit 1\n ;;\nesac\n\nif [ $? -ne 0 ]; then\n echo \"ERROR: Convex deployment failed.\"\n exit 1\nfi\n\necho \"Convex deployment completed successfully.\"\n"
1313
},
1414
"Parameters": [
1515
{

step-templates/convex-export-data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"Properties": {
1010
"Octopus.Action.Script.ScriptSource": "Inline",
1111
"Octopus.Action.Script.Syntax": "Bash",
12-
"Octopus.Action.Script.ScriptBody": "deployKey=$(get_octopusvariable \"ConvexExport.DeployKey\")\noutputPath=$(get_octopusvariable \"ConvexExport.OutputPath\")\ndeploymentType=$(get_octopusvariable \"ConvexExport.DeploymentType\")\npreviewName=$(get_octopusvariable \"ConvexExport.PreviewName\")\nworkingDir=$(get_octopusvariable \"ConvexExport.WorkingDirectory\")\ncaptureArtifact=$(get_octopusvariable \"ConvexExport.CaptureAsArtifact\")\ncmdTimeout=$(get_octopusvariable \"ConvexExport.CommandTimeout\")\n\nif [ -z \"$deployKey\" ]; then\n echo \"ERROR: ConvexExport.DeployKey is required.\"\n exit 1\nfi\n\nif [ -z \"$deploymentType\" ]; then\n deploymentType=\"prod\"\nfi\n\nif [ -z \"$cmdTimeout\" ]; then\n cmdTimeout=\"600\"\nfi\n\nexport CONVEX_DEPLOY_KEY=\"$deployKey\"\n\nif [ -n \"$workingDir\" ]; then\n echo \"Changing to working directory: $workingDir\"\n cd \"$workingDir\" || { echo \"ERROR: Could not change to directory '$workingDir'\"; exit 1; }\nfi\n\ntimestamp=$(date +\"%Y%m%d_%H%M%S\")\n\nif [ -z \"$outputPath\" ]; then\n outputPath=\"convex-export-${timestamp}.zip\"\nfi\n\ndeploymentFlag=\"\"\ncase \"$deploymentType\" in\n prod)\n deploymentFlag=\"--prod\"\n ;;\n preview)\n if [ -z \"$previewName\" ]; then\n echo \"ERROR: ConvexExport.PreviewName is required when deployment type is 'preview'.\"\n exit 1\n fi\n deploymentFlag=\"--preview-name $previewName\"\n ;;\n dev)\n deploymentFlag=\"\"\n ;;\nesac\n\necho \"Exporting Convex data from: $deploymentType\"\necho \"Output file: $outputPath\"\n\ntimeout \"$cmdTimeout\" npx convex export $deploymentFlag --path \"$outputPath\"\n\nexitCode=$?\nif [ $exitCode -ne 0 ]; then\n echo \"ERROR: Convex export failed with exit code $exitCode.\"\n exit $exitCode\nfi\n\nif [ ! -f \"$outputPath\" ]; then\n echo \"ERROR: Export completed but output file not found at '$outputPath'.\"\n exit 1\nfi\n\nfileSize=$(du -sh \"$outputPath\" | cut -f1)\necho \"Export complete. File: $outputPath ($fileSize)\"\n\nif [ \"$captureArtifact\" = \"True\" ]; then\n new_octopusartifact \"$outputPath\"\n echo \"Export captured as Octopus artifact.\"\nfi\n"
12+
"Octopus.Action.Script.ScriptBody": "deployKey=$(get_octopusvariable \"ConvexExport.DeployKey\")\noutputPath=$(get_octopusvariable \"ConvexExport.OutputPath\")\ndeploymentType=$(get_octopusvariable \"ConvexExport.DeploymentType\")\npreviewName=$(get_octopusvariable \"ConvexExport.PreviewName\")\nworkingDir=$(get_octopusvariable \"ConvexExport.WorkingDirectory\")\ncaptureArtifact=$(get_octopusvariable \"ConvexExport.CaptureAsArtifact\")\ncmdTimeout=$(get_octopusvariable \"ConvexExport.CommandTimeout\")\n\nif [ -z \"$deployKey\" ]; then\n echo \"ERROR: ConvexExport.DeployKey is required.\"\n exit 1\nfi\n\nif [ -z \"$deploymentType\" ]; then\n deploymentType=\"prod\"\nfi\n\nif [ -z \"$cmdTimeout\" ]; then\n cmdTimeout=\"600\"\nfi\n\nexport CONVEX_DEPLOY_KEY=\"$deployKey\"\n\nif [ -n \"$workingDir\" ]; then\n echo \"Changing to working directory: $workingDir\"\n cd \"$workingDir\" || { echo \"ERROR: Could not change to directory '$workingDir'\"; exit 1; }\nfi\n\ntimestamp=$(date +\"%Y%m%d_%H%M%S\")\n\nif [ -z \"$outputPath\" ]; then\n outputPath=\"convex-export-${timestamp}.zip\"\nfi\n\ndeploymentFlag=\"\"\ncase \"$deploymentType\" in\n prod)\n deploymentFlag=\"--prod\"\n ;;\n preview)\n if [ -z \"$previewName\" ]; then\n echo \"ERROR: ConvexExport.PreviewName is required when deployment type is 'preview'.\"\n exit 1\n fi\n deploymentFlag=\"--preview-name $previewName\"\n ;;\n dev)\n deploymentFlag=\"\"\n ;;\nesac\n\nensure_node() {\n if command -v npx &>/dev/null; then\n echo \"Node.js found: $(node --version)\"\n return 0\n fi\n export NVM_DIR=\"${NVM_DIR:-$HOME/.nvm}\"\n if [ -s \"$NVM_DIR/nvm.sh\" ]; then\n \\. \"$NVM_DIR/nvm.sh\"\n if command -v npx &>/dev/null; then\n echo \"Node.js loaded via nvm: $(node --version)\"\n return 0\n fi\n fi\n echo \"Node.js not found. Installing via nvm...\"\n curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash\n \\. \"$NVM_DIR/nvm.sh\"\n nvm install --lts\n echo \"Node.js installed: $(node --version)\"\n}\nensure_node\n\necho \"Exporting Convex data from: $deploymentType\"\necho \"Output file: $outputPath\"\n\ntimeout \"$cmdTimeout\" npx convex export $deploymentFlag --path \"$outputPath\"\n\nexitCode=$?\nif [ $exitCode -ne 0 ]; then\n echo \"ERROR: Convex export failed with exit code $exitCode.\"\n exit $exitCode\nfi\n\nif [ ! -f \"$outputPath\" ]; then\n echo \"ERROR: Export completed but output file not found at '$outputPath'.\"\n exit 1\nfi\n\nfileSize=$(du -sh \"$outputPath\" | cut -f1)\necho \"Export complete. File: $outputPath ($fileSize)\"\n\nif [ \"$captureArtifact\" = \"True\" ]; then\n new_octopusartifact \"$outputPath\"\n echo \"Export captured as Octopus artifact.\"\nfi\n"
1313
},
1414
"Parameters": [
1515
{

step-templates/convex-run-function.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"Properties": {
1010
"Octopus.Action.Script.ScriptSource": "Inline",
1111
"Octopus.Action.Script.Syntax": "Bash",
12-
"Octopus.Action.Script.ScriptBody": "deployKey=$(get_octopusvariable \"ConvexRun.DeployKey\")\nfunctionPath=$(get_octopusvariable \"ConvexRun.FunctionPath\")\nfunctionArgs=$(get_octopusvariable \"ConvexRun.FunctionArgs\")\ndeploymentType=$(get_octopusvariable \"ConvexRun.DeploymentType\")\npreviewName=$(get_octopusvariable \"ConvexRun.PreviewName\")\nworkingDir=$(get_octopusvariable \"ConvexRun.WorkingDirectory\")\ncmdTimeout=$(get_octopusvariable \"ConvexRun.CommandTimeout\")\n\nif [ -z \"$deployKey\" ]; then\n echo \"ERROR: ConvexRun.DeployKey is required.\"\n exit 1\nfi\n\nif [ -z \"$functionPath\" ]; then\n echo \"ERROR: ConvexRun.FunctionPath is required.\"\n exit 1\nfi\n\nif [ -z \"$deploymentType\" ]; then\n deploymentType=\"prod\"\nfi\n\nif [ -z \"$cmdTimeout\" ]; then\n cmdTimeout=\"120\"\nfi\n\nexport CONVEX_DEPLOY_KEY=\"$deployKey\"\n\nif [ -n \"$workingDir\" ]; then\n echo \"Changing to working directory: $workingDir\"\n cd \"$workingDir\" || { echo \"ERROR: Could not change to directory '$workingDir'\"; exit 1; }\nfi\n\ndeploymentFlag=\"\"\ncase \"$deploymentType\" in\n prod)\n deploymentFlag=\"--prod\"\n ;;\n preview)\n if [ -z \"$previewName\" ]; then\n echo \"ERROR: ConvexRun.PreviewName is required when deployment type is 'preview'.\"\n exit 1\n fi\n deploymentFlag=\"--preview-name $previewName\"\n ;;\n dev)\n deploymentFlag=\"\"\n ;;\nesac\n\necho \"Running Convex function: $functionPath\"\necho \"Deployment type: $deploymentType\"\n\nif [ -n \"$functionArgs\" ]; then\n echo \"Args: $functionArgs\"\n timeout \"$cmdTimeout\" npx convex run $deploymentFlag \"$functionPath\" \"$functionArgs\"\nelse\n timeout \"$cmdTimeout\" npx convex run $deploymentFlag \"$functionPath\"\nfi\n\nexitCode=$?\nif [ $exitCode -ne 0 ]; then\n echo \"ERROR: Convex function '$functionPath' failed with exit code $exitCode.\"\n exit $exitCode\nfi\n\necho \"Convex function '$functionPath' completed successfully.\"\n"
12+
"Octopus.Action.Script.ScriptBody": "deployKey=$(get_octopusvariable \"ConvexRun.DeployKey\")\nfunctionPath=$(get_octopusvariable \"ConvexRun.FunctionPath\")\nfunctionArgs=$(get_octopusvariable \"ConvexRun.FunctionArgs\")\ndeploymentType=$(get_octopusvariable \"ConvexRun.DeploymentType\")\npreviewName=$(get_octopusvariable \"ConvexRun.PreviewName\")\nworkingDir=$(get_octopusvariable \"ConvexRun.WorkingDirectory\")\ncmdTimeout=$(get_octopusvariable \"ConvexRun.CommandTimeout\")\n\nif [ -z \"$deployKey\" ]; then\n echo \"ERROR: ConvexRun.DeployKey is required.\"\n exit 1\nfi\n\nif [ -z \"$functionPath\" ]; then\n echo \"ERROR: ConvexRun.FunctionPath is required.\"\n exit 1\nfi\n\nif [ -z \"$deploymentType\" ]; then\n deploymentType=\"prod\"\nfi\n\nif [ -z \"$cmdTimeout\" ]; then\n cmdTimeout=\"120\"\nfi\n\nexport CONVEX_DEPLOY_KEY=\"$deployKey\"\n\nif [ -n \"$workingDir\" ]; then\n echo \"Changing to working directory: $workingDir\"\n cd \"$workingDir\" || { echo \"ERROR: Could not change to directory '$workingDir'\"; exit 1; }\nfi\n\ndeploymentFlag=\"\"\ncase \"$deploymentType\" in\n prod)\n deploymentFlag=\"--prod\"\n ;;\n preview)\n if [ -z \"$previewName\" ]; then\n echo \"ERROR: ConvexRun.PreviewName is required when deployment type is 'preview'.\"\n exit 1\n fi\n deploymentFlag=\"--preview-name $previewName\"\n ;;\n dev)\n deploymentFlag=\"\"\n ;;\nesac\n\nensure_node() {\n if command -v npx &>/dev/null; then\n echo \"Node.js found: $(node --version)\"\n return 0\n fi\n export NVM_DIR=\"${NVM_DIR:-$HOME/.nvm}\"\n if [ -s \"$NVM_DIR/nvm.sh\" ]; then\n \\. \"$NVM_DIR/nvm.sh\"\n if command -v npx &>/dev/null; then\n echo \"Node.js loaded via nvm: $(node --version)\"\n return 0\n fi\n fi\n echo \"Node.js not found. Installing via nvm...\"\n curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash\n \\. \"$NVM_DIR/nvm.sh\"\n nvm install --lts\n echo \"Node.js installed: $(node --version)\"\n}\nensure_node\n\necho \"Running Convex function: $functionPath\"\necho \"Deployment type: $deploymentType\"\n\nif [ -n \"$functionArgs\" ]; then\n echo \"Args: $functionArgs\"\n timeout \"$cmdTimeout\" npx convex run $deploymentFlag \"$functionPath\" \"$functionArgs\"\nelse\n timeout \"$cmdTimeout\" npx convex run $deploymentFlag \"$functionPath\"\nfi\n\nexitCode=$?\nif [ $exitCode -ne 0 ]; then\n echo \"ERROR: Convex function '$functionPath' failed with exit code $exitCode.\"\n exit $exitCode\nfi\n\necho \"Convex function '$functionPath' completed successfully.\"\n"
1313
},
1414
"Parameters": [
1515
{

step-templates/convex-set-environment-variables.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"Properties": {
1010
"Octopus.Action.Script.ScriptSource": "Inline",
1111
"Octopus.Action.Script.Syntax": "Bash",
12-
"Octopus.Action.Script.ScriptBody": "deployKey=$(get_octopusvariable \"ConvexEnvSet.DeployKey\")\nenvVars=$(get_octopusvariable \"ConvexEnvSet.EnvironmentVariables\")\ndeploymentType=$(get_octopusvariable \"ConvexEnvSet.DeploymentType\")\npreviewName=$(get_octopusvariable \"ConvexEnvSet.PreviewName\")\nworkingDir=$(get_octopusvariable \"ConvexEnvSet.WorkingDirectory\")\n\nif [ -z \"$deployKey\" ]; then\n echo \"ERROR: ConvexEnvSet.DeployKey is required.\"\n exit 1\nfi\n\nif [ -z \"$envVars\" ]; then\n echo \"ERROR: ConvexEnvSet.EnvironmentVariables is required.\"\n exit 1\nfi\n\nif [ -z \"$deploymentType\" ]; then\n deploymentType=\"prod\"\nfi\n\nexport CONVEX_DEPLOY_KEY=\"$deployKey\"\n\nif [ -n \"$workingDir\" ]; then\n echo \"Changing to working directory: $workingDir\"\n cd \"$workingDir\" || { echo \"ERROR: Could not change to directory '$workingDir'\"; exit 1; }\nfi\n\ndeploymentFlag=\"\"\ncase \"$deploymentType\" in\n prod)\n deploymentFlag=\"--prod\"\n ;;\n preview)\n if [ -z \"$previewName\" ]; then\n echo \"ERROR: ConvexEnvSet.PreviewName is required when deployment type is 'preview'.\"\n exit 1\n fi\n deploymentFlag=\"--preview-name $previewName\"\n ;;\n dev)\n deploymentFlag=\"\"\n ;;\nesac\n\necho \"Setting environment variables on Convex deployment ($deploymentType)...\"\n\nsuccessCount=0\nfailCount=0\n\nwhile IFS= read -r line; do\n line=$(echo \"$line\" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')\n [ -z \"$line\" ] && continue\n [[ \"$line\" == \\#* ]] && continue\n\n if [[ \"$line\" != *=* ]]; then\n echo \"WARNING: Skipping malformed entry (no '=' found): $line\"\n continue\n fi\n\n key=\"${line%%=*}\"\n value=\"${line#*=}\"\n\n echo \"Setting: $key\"\n if npx convex env set $deploymentFlag \"$key\" \"$value\"; then\n successCount=$((successCount + 1))\n else\n echo \"ERROR: Failed to set variable '$key'.\"\n failCount=$((failCount + 1))\n fi\ndone <<< \"$envVars\"\n\necho \"Done. $successCount variable(s) set successfully, $failCount failed.\"\n\nif [ \"$failCount\" -gt 0 ]; then\n exit 1\nfi\n"
12+
"Octopus.Action.Script.ScriptBody": "deployKey=$(get_octopusvariable \"ConvexEnvSet.DeployKey\")\nenvVars=$(get_octopusvariable \"ConvexEnvSet.EnvironmentVariables\")\ndeploymentType=$(get_octopusvariable \"ConvexEnvSet.DeploymentType\")\npreviewName=$(get_octopusvariable \"ConvexEnvSet.PreviewName\")\nworkingDir=$(get_octopusvariable \"ConvexEnvSet.WorkingDirectory\")\n\nif [ -z \"$deployKey\" ]; then\n echo \"ERROR: ConvexEnvSet.DeployKey is required.\"\n exit 1\nfi\n\nif [ -z \"$envVars\" ]; then\n echo \"ERROR: ConvexEnvSet.EnvironmentVariables is required.\"\n exit 1\nfi\n\nif [ -z \"$deploymentType\" ]; then\n deploymentType=\"prod\"\nfi\n\nexport CONVEX_DEPLOY_KEY=\"$deployKey\"\n\nif [ -n \"$workingDir\" ]; then\n echo \"Changing to working directory: $workingDir\"\n cd \"$workingDir\" || { echo \"ERROR: Could not change to directory '$workingDir'\"; exit 1; }\nfi\n\ndeploymentFlag=\"\"\ncase \"$deploymentType\" in\n prod)\n deploymentFlag=\"--prod\"\n ;;\n preview)\n if [ -z \"$previewName\" ]; then\n echo \"ERROR: ConvexEnvSet.PreviewName is required when deployment type is 'preview'.\"\n exit 1\n fi\n deploymentFlag=\"--preview-name $previewName\"\n ;;\n dev)\n deploymentFlag=\"\"\n ;;\nesac\n\nensure_node() {\n if command -v npx &>/dev/null; then\n echo \"Node.js found: $(node --version)\"\n return 0\n fi\n export NVM_DIR=\"${NVM_DIR:-$HOME/.nvm}\"\n if [ -s \"$NVM_DIR/nvm.sh\" ]; then\n \\. \"$NVM_DIR/nvm.sh\"\n if command -v npx &>/dev/null; then\n echo \"Node.js loaded via nvm: $(node --version)\"\n return 0\n fi\n fi\n echo \"Node.js not found. Installing via nvm...\"\n curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash\n \\. \"$NVM_DIR/nvm.sh\"\n nvm install --lts\n echo \"Node.js installed: $(node --version)\"\n}\nensure_node\n\necho \"Setting environment variables on Convex deployment ($deploymentType)...\"\n\nsuccessCount=0\nfailCount=0\n\nwhile IFS= read -r line; do\n line=$(echo \"$line\" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')\n [ -z \"$line\" ] && continue\n [[ \"$line\" == \\#* ]] && continue\n\n if [[ \"$line\" != *=* ]]; then\n echo \"WARNING: Skipping malformed entry (no '=' found): $line\"\n continue\n fi\n\n key=\"${line%%=*}\"\n value=\"${line#*=}\"\n\n echo \"Setting: $key\"\n if npx convex env set $deploymentFlag \"$key\" \"$value\"; then\n successCount=$((successCount + 1))\n else\n echo \"ERROR: Failed to set variable '$key'.\"\n failCount=$((failCount + 1))\n fi\ndone <<< \"$envVars\"\n\necho \"Done. $successCount variable(s) set successfully, $failCount failed.\"\n\nif [ \"$failCount\" -gt 0 ]; then\n exit 1\nfi\n"
1313
},
1414
"Parameters": [
1515
{

0 commit comments

Comments
 (0)