Skip to content

Commit

Permalink
build(snap): Update edgex-snap-hooks to 2.3.1 (#4071)
Browse files Browse the repository at this point in the history
Signed-off-by: Mengyi Wang <mengyi.wang@canonical.com>
  • Loading branch information
MonicaisHer committed Jul 4, 2022
1 parent 33a3e4f commit 11a51fe
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion snap/local/hooks/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/canonical/edgex-go/hooks

require github.com/canonical/edgex-snap-hooks/v2 v2.2.0
require github.com/canonical/edgex-snap-hooks/v2 v2.3.1

go 1.17
16 changes: 10 additions & 6 deletions snap/local/hooks/go.sum
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
github.com/canonical/edgex-snap-hooks/v2 v2.2.0 h1:4pDnikrtyrxiynTM49+ppH7hXBx5C7dWUOjEEisCXmI=
github.com/canonical/edgex-snap-hooks/v2 v2.2.0/go.mod h1:rOxrwdYL7hJDhxFH3uV+nVgLPjWOhJWgM5PRD5YG1jI=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/canonical/edgex-snap-hooks/v2 v2.3.1 h1:6/wlpQGFB6nc293dk05UcpVrbDgnV74pR452DWP7bRM=
github.com/canonical/edgex-snap-hooks/v2 v2.3.1/go.mod h1:8mjUKSAFNsXYvV0fcfOoYue1dSjTVeJYdaQYtA6pb6Y=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
15 changes: 7 additions & 8 deletions snap/local/runtime-helpers/bin/service-config-overrides.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ BINPATH="${ARGV[0]}"

# binary name == service name/key
SERVICE=$(basename "$BINPATH")
SERVICE_ENV="$SNAP_DATA/config/$SERVICE/res/$SERVICE.env"
ENV_FILE="$SNAP_DATA/config/$SERVICE/res/$SERVICE.env"
TAG="edgex-$SERVICE."$(basename "$0")

logger "edgex checking for service env: $SERVICE_ENV"

if [ -f "$SERVICE_ENV" ]; then
logger "edgex service override: : sourcing $SERVICE_ENV"
source "$SERVICE_ENV"
if [ -f "$ENV_FILE" ]; then
logger --tag=$TAG "sourcing $ENV_FILE"
set -o allexport
source "$ENV_FILE" set
set +o allexport
fi

logger "edgex starting: $SERVICE"

exec "$@"

0 comments on commit 11a51fe

Please sign in to comment.