There are a few errors in this sample project that cause a failed installation.
- There is a discrepancy between the project name in the snapcraft.yaml and in the README.
- The incorrect project name used in the README is also used in the generate_manifest.sh line 7. The script should be as below.
NAME=$(shuf -n2 $SNAP/usr/share/dict/words | tr '\n' ' ') mkdir -p $SNAP_DATA/package-assets/$SNAP_NAME $SNAP/usr/bin/jq ".menus.sidebar[].title = \"$NAME\"" \ $SNAP/package-assets/changing-world.package-manifest.json.template > $SNAP_DATA/package-assets/sdk-generate-manifest/changing-world.package-manifest.json
-
The install and post-refresh hooks call the snapcraft-runner which does not exist in the project. They should both simply call generate manifest.
generate_manifest.sh
With these changes, the project builds and installs correctly.
There are a few errors in this sample project that cause a failed installation.
NAME=$(shuf -n2 $SNAP/usr/share/dict/words | tr '\n' ' ') mkdir -p $SNAP_DATA/package-assets/$SNAP_NAME $SNAP/usr/bin/jq ".menus.sidebar[].title = \"$NAME\"" \ $SNAP/package-assets/changing-world.package-manifest.json.template > $SNAP_DATA/package-assets/sdk-generate-manifest/changing-world.package-manifest.jsonThe install and post-refresh hooks call the snapcraft-runner which does not exist in the project. They should both simply call generate manifest.
generate_manifest.shWith these changes, the project builds and installs correctly.