Skip to content

itowlson/spin-pluginify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spin pluginify - a Spin plugin to help build Spin plugins

This is a Spin plugin that helps with the inner loop of Spin plugin development by creating the tar file and manifest for you.

Prerequisites

Installation

cargo run -r -- --install

Usage

Preparation

For your plugin, create a spin-pluginify.toml file with the following content:

name = "<PLUGIN-NAME>"
version = "0.1"
spin_compatibility = ">=0.7"
license = "Apache-2.0"
package = "<./PATH/TO/EXECUTABLE>"
# optional - if present these files will be added to the plugin tar file
assets = [ "path/to/asset/1", "path/to/asset/2" ]

You can find examples in this repo and in https://github.com/fermyon/spin-trigger-sqs.

Updating

When you have a new build of your plugin ready:

  • Run spin pluginify
    • It should create or update a <PLUGIN-NAME>.tar.gz file and a <PLUGIN-NAME>.json manifest
  • Run spin plugins install --file <PLUGIN-NAME>.json --yes

If you want to save keystrokes, you can use spin pluginify --install to do both steps at once.

Your plugin should then be installed in Spin and ready to test.

Troubleshooting

Error handling is non-existent right now so, uh, sorry.