File tree Expand file tree Collapse file tree 4 files changed +13
-8
lines changed Expand file tree Collapse file tree 4 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,4 @@ bindings_name=$1
4
4
bindings_path=$2
5
5
6
6
go mod edit -require=" $bindings_name " @v0.0.0
7
- go mod edit -replace=" $bindings_name " =" $bindings_path "
8
-
9
- function revert_private_bindings {
10
- go mod edit -droprequire=" $bindings_name "
11
- go mod edit -dropreplace=" $bindings_name "
12
- }
13
-
14
- trap revert_private_bindings EXIT
7
+ go mod edit -replace=" $bindings_name " =" $bindings_path "
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ tags="${FEATURES:-"telio drop"}"
62
62
source " ${WORKDIR} " /ci/set_bindings_version.sh libtelio
63
63
source " ${WORKDIR} " /ci/set_bindings_version.sh libdrop
64
64
65
+ private_bindings_rollback=" "
65
66
if [[ $tags == * " moose" * ]]; then
66
67
# Set correct events domain in case compiling with moose
67
68
if [[ " ${ENVIRONMENT} " == " prod" ]]; then
@@ -74,11 +75,15 @@ if [[ $tags == *"moose"* ]]; then
74
75
-X 'main.EventsDomain=${events_domain:- " " } ' \
75
76
-X 'main.EventsSubdomain=${EVENTS_SUBDOMAIN:- " " } '"
76
77
78
+ private_bindings_rollback=" ${WORKDIR} /ci/remove_private_bindings.sh moose/events; ${WORKDIR} /ci/remove_private_bindings.sh moose/worker;"
79
+ trap " $private_bindings_rollback " EXIT
77
80
source " ${WORKDIR} " /ci/add_private_bindings.sh moose/events ./third-party/moose-events/moosenordvpnappgo/v14
78
81
source " ${WORKDIR} " /ci/add_private_bindings.sh moose/worker ./third-party/moose-worker/mooseworkergo/v14
79
82
fi
80
83
81
84
if [[ $tags == * " quench" * ]]; then
85
+ private_bindings_rollback=" ${private_bindings_rollback} ${WORKDIR} /ci/remove_private_bindings.sh quench"
86
+ trap " $private_bindings_rollback " EXIT
82
87
source " ${WORKDIR} " /ci/add_private_bindings.sh quench ./third-party/libquench-go
83
88
fi
84
89
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ bindings_name=$1
4
+
5
+ go mod edit -droprequire=" $bindings_name "
6
+ go mod edit -dropreplace=" $bindings_name "
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ tags="internal"
18
18
# everything
19
19
if [ " ${1:- " " } " = " full" ]; then
20
20
# Apply moose patch in case compiling with moose
21
+ trap " ${WORKDIR} /ci/remove_private_bindings.sh moose/events; ${WORKDIR} /ci/remove_private_bindings.sh moose/worker;" EXIT
21
22
source " ${WORKDIR} " /ci/add_private_bindings.sh moose/events ./third-party/moose-events/moosenordvpnappgo/v14
22
23
source " ${WORKDIR} " /ci/add_private_bindings.sh moose/worker ./third-party/moose-worker/mooseworkergo/v14
23
24
You can’t perform that action at this time.
0 commit comments