Browse Source

Add missing file

Joachim M. Giæver 2 years ago
parent
commit
333f48b14c
2 changed files with 19 additions and 4 deletions
  1. 5 4
      snap/snapcraft.yaml
  2. 14 0
      src/hooks/pre-refresh

+ 5 - 4
snap/snapcraft.yaml

@@ -19,9 +19,9 @@ assumes:
   - command-chain
 
 architectures:
-  # - build-on: amd64
+  - build-on: amd64
   - build-on: arm64
-  # - build-on: armhf
+  - build-on: armhf
 
 apps:
   zwavejs2mqtt:
@@ -78,13 +78,14 @@ parts:
     after: [nodejs]
     plugin: dump
     source: https://github.com/zwave-js/zwavejs2mqtt.git
-    source-tag: $SNAPCRAFT_PROJECT_VERSION
+    #source-branch: "fix#1762"
+    #source-tag: $SNAPCRAFT_PROJECT_VERSION
     build-packages:
       - gcc
       - build-essential
     override-build: |
       set -x
-      # sed -i 's/"zwave-js".*$/"zwave-js"\: "8.3.2-0-pr-3262-f5cdbca"/g' ${SNAPCRAFT_PART_BUILD}/package.json
+      #sed -i 's/"zwave-js".*$/"zwave-js"\: "8.3.2-0-pr-3262-f5cdbca"/g' ${SNAPCRAFT_PART_BUILD}/package.json
       if [ -n "${http_proxy-}" ]; then
         export GLOBAL_AGENT_HTTP_PROXY="${http_proxy}"
         export GLOBAL_AGENT_HTTPS_PROXY="${http_proxy}"

+ 14 - 0
src/hooks/pre-refresh

@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+source $SNAP/helper/functions
+
+# Not needed anymore as of ZWAVEJS_EXTERNAL_CONFIG?
+# logger "Storing latest device config..."
+# mkdir -p "${SNAP_COMMON}/latest-device-config"
+# rsync -raz "${ZWAVE_JS_CONF}" "${SNAP_COMMON}/latest-device-config"
+test_default_config
+
+# When user can change store dir....
+# if [ "${STORE_DIR}" == "${SNAP_DATA}" ]; then
+#     snapctl set
+