From fd0edad57bc089b1105d75ac77ca7bf25ddb3c0f Mon Sep 17 00:00:00 2001 From: serverless-devs Date: Fri, 10 Feb 2023 05:03:37 +0000 Subject: [PATCH 1/5] v1.0.30 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index bdb57c3..ed48fc7 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,7 @@ var getFormBody = require('body/form'); var body = require('body'); const BUILD_TIME = '{BUILD_TIME}'; -const VERSION = '1.0.29'; +const VERSION = '1.0.30'; exports.handler = (req, resp, context) => { console.log('hello world'); From 3634bec82a071f06c5682f97228a91a983e048f4 Mon Sep 17 00:00:00 2001 From: serverless-devs Date: Fri, 10 Feb 2023 08:37:16 +0000 Subject: [PATCH 2/5] test retry --- build.bash | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build.bash b/build.bash index 03d4aa9..6bf8021 100755 --- a/build.bash +++ b/build.bash @@ -1,5 +1,11 @@ #!/bin/bash + +r="$((($RANDOM * $RANDOM) % 5 ))" +echo $r + +if [ "$r" -ne "0" ] ; then echo "error!" && abcdefg; fi + BUILD_TIME=$(date '+%Y-%m-%d %H:%M:%S') mkdir -p build From a45d75fc8f0f96f56a6551e36bc247297adecd41 Mon Sep 17 00:00:00 2001 From: serverless-devs Date: Fri, 10 Feb 2023 08:42:54 +0000 Subject: [PATCH 3/5] return 1 --- build.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.bash b/build.bash index 6bf8021..604bc42 100755 --- a/build.bash +++ b/build.bash @@ -4,7 +4,7 @@ r="$((($RANDOM * $RANDOM) % 5 ))" echo $r -if [ "$r" -ne "0" ] ; then echo "error!" && abcdefg; fi +if [ "$r" -ne "0" ] ; then echo "error!" && abcdefg && return 1; fi BUILD_TIME=$(date '+%Y-%m-%d %H:%M:%S') From 25d806e10447053783d73c69844dc8d1e64765bc Mon Sep 17 00:00:00 2001 From: serverless-devs Date: Fri, 10 Feb 2023 08:46:01 +0000 Subject: [PATCH 4/5] remove command not found --- build.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.bash b/build.bash index 604bc42..ec225ca 100755 --- a/build.bash +++ b/build.bash @@ -4,7 +4,7 @@ r="$((($RANDOM * $RANDOM) % 5 ))" echo $r -if [ "$r" -ne "0" ] ; then echo "error!" && abcdefg && return 1; fi +if [ "$r" -ne "0" ] ; then echo "error!" && return 1; fi BUILD_TIME=$(date '+%Y-%m-%d %H:%M:%S') From 4c90f8c93028a69e88695ad84040d0c124264e4a Mon Sep 17 00:00:00 2001 From: serverless-devs Date: Fri, 10 Feb 2023 08:47:42 +0000 Subject: [PATCH 5/5] use exit --- build.bash | 2 +- index.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build.bash b/build.bash index ec225ca..690fe9c 100755 --- a/build.bash +++ b/build.bash @@ -4,7 +4,7 @@ r="$((($RANDOM * $RANDOM) % 5 ))" echo $r -if [ "$r" -ne "0" ] ; then echo "error!" && return 1; fi +if [ "$r" -ne "0" ] ; then echo "error!" && exit; fi BUILD_TIME=$(date '+%Y-%m-%d %H:%M:%S') diff --git a/index.js b/index.js index ed48fc7..4381873 100644 --- a/index.js +++ b/index.js @@ -14,8 +14,7 @@ exports.handler = (req, resp, context) => { headers: req.headers, method: req.method, requestURI: req.url, - clientIP: req.clientIP, - version: VERSION, + clientIP: req.clientIP, version: VERSION, buildVersion: BUILD_TIME, };