diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 2e9e4313..324ecdef 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: edgex-device-onvif-camera -base: core20 +base: core22 license: Apache-2.0 summary: EdgeX ONVIF Camera Device Service description: Refer to https://snapcraft.io/edgex-device-onvif-camera @@ -23,14 +23,8 @@ plugs: interface: content target: $SNAP_DATA/config/device-onvif-camera - # deprecated - device-config: - interface: content - target: $SNAP_DATA/config/device-onvif-camera - apps: device-onvif-camera: - adapter: full command: bin/device-onvif-camera --configDir $SNAP_DATA/config/device-onvif-camera/res --configProvider --registry command-chain: - bin/source-env-file.sh @@ -50,9 +44,9 @@ parts: build-snaps: - go/1.20/stable override-build: | - cd $SNAPCRAFT_PART_SRC + cd $CRAFT_PART_SRC make build - install -DT ./helper-go $SNAPCRAFT_PART_INSTALL/bin/helper-go + install -DT ./helper-go $CRAFT_PART_INSTALL/bin/helper-go device-onvif-camera: source: . @@ -61,7 +55,7 @@ parts: build-snaps: - go/1.20/stable override-build: | - cd $SNAPCRAFT_PART_SRC + cd $CRAFT_PART_SRC if git describe ; then VERSION=$(git describe --tags --abbrev=0 | sed 's/v//') @@ -70,23 +64,20 @@ parts: fi # set the version of the snap - snapcraftctl set-version $VERSION + craftctl set version=$VERSION # write version to file for the build echo $VERSION > VERSION make build - install -DT cmd/device-onvif-camera $SNAPCRAFT_PART_INSTALL/bin/device-onvif-camera + install -DT cmd/device-onvif-camera $CRAFT_PART_INSTALL/bin/device-onvif-camera - RES=$SNAPCRAFT_PART_INSTALL/config/device-onvif-camera/res/ + RES=$CRAFT_PART_INSTALL/config/device-onvif-camera/res/ mkdir -p $RES - cp cmd/res/configuration.yaml $RES - cp -r cmd/res/devices $RES - cp -r cmd/res/profiles $RES - cp -r cmd/res/provisionwatchers $RES + cp -r cmd/res/* $RES - DOC=$SNAPCRAFT_PART_INSTALL/usr/share/doc/device-onvif-camera + DOC=$CRAFT_PART_INSTALL/usr/share/doc/device-onvif-camera mkdir -p $DOC cp Attribution.txt $DOC/Attribution.txt cp LICENSE $DOC/LICENSE