Skip to content

Commit ca437e5

Browse files
committed
implement FASTBUILD on top of SKIP_<step> plumbing (opt-out instead of opt-in)
1 parent 0c8bc2b commit ca437e5

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

build-go-project.sh

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,6 @@ removePreviousBuildArtefacts() {
156156
}
157157

158158
standardBuildProcess() {
159-
# skips steps that aren't usually strictly necessary when doing minor modifications.
160-
# however, if you encounter a bug, remember to run full build for static analysis etc., tests etc.
161-
if [ -n "${FASTBUILD:-}" ]; then
162-
buildstep removePreviousBuildArtefacts
163-
164-
buildstep binaries
165-
166-
return
167-
fi
168-
169159
buildstep removePreviousBuildArtefacts
170160

171161
buildstep downloadDependencies
@@ -191,8 +181,6 @@ standardBuildProcess() {
191181
}
192182

193183
function packageLambdaFunction {
194-
if [ ! -z ${FASTBUILD+x} ]; then return; fi
195-
196184
# run in subshell because we need to change paths
197185
(
198186
cd rel/
@@ -252,5 +240,14 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
252240
# has to be set, so provide a default value if unset
253241
FRIENDLY_REV_ID=${FRIENDLY_REV_ID:-dev}
254242

243+
# skips steps that aren't usually strictly necessary when doing minor modifications.
244+
# however, if you encounter a bug, remember to run full build for static analysis etc., tests etc.
245+
if [ -n "${FASTBUILD:-}" ]; then
246+
SKIP_DOWNLOADDEPENDENCIES=y
247+
SKIP_CODEGENERATION=y
248+
SKIP_STATICANALYSIS=y
249+
SKIP_TESTS=y
250+
fi
251+
255252
standardBuildProcess
256253
fi

0 commit comments

Comments
 (0)