I created a repo with go plugin template and made ...
# pact-plugins
s
I created a repo with go plugin template and made the changes following readme, now when I try to install it i'm getting below error
Copy code
pact-plugin-cli.exe install <https://github.com/sameena-ops/pact-sample-plugin/releases/tag/v0.0.5>
Installing plugin pact-sample-plugin version 0.0.4
✔ Plugin with name 'pact-sample-plugin' and version '0.0.4' already exists. Overwrite it? · Yes
Error: Did not find a matching file pattern on GitHub to install
m
Try adding the verbose flag, it should show what targets it's trying to find
Aha it looks like the version in the plugin json is incorrect 🤔(still 0.0.4) I wonder if there is a bug in the code that updates that?
s
yeah right i missed updating to 0.0.5 in plugin json, let me change and check
but still its looking for 0.0.4
Copy code
Installing plugin pact-sample-plugin version 0.0.4
✔ Plugin with name 'pact-sample-plugin' and version '0.0.4' already exists. Overwrite it? · Yes
2022-12-20T09:09:22.400911Z  INFO pact_plugin_cli::install: Deleting contents of plugin directory
2022-12-20T09:09:22.408563Z  INFO pact_plugin_cli::install: Writing plugin manifest file
2022-12-20T09:09:22.415874Z DEBUG pact_plugin_cli::install: Detected OS: Windows 10.0.19044 (Windows 10 Enterprise) [64-bit]
2022-12-20T09:09:22.417143Z DEBUG pact_plugin_cli::install: Checking existence of file from <https://github.com/sameena-ops/pact-sample-plugin/releases/download/v0.0.5/pact-pact-sample-plugin-plugin-windows-x86_64.exe.gz>
2022-12-20T09:09:22.420079Z DEBUG hyper::client::pool: reuse idle connection for ("https", <http://github.com|github.com>)
2022-12-20T09:09:22.420977Z DEBUG Connection{peer=Client}: h2::codec::framed_write: send frame=Headers { stream_id: StreamId(5), flags: (0x5: END_HEADERS | END_STREAM) }
2022-12-20T09:09:22.635027Z DEBUG Connection{peer=Client}: h2::codec::framed_read: received frame=Headers { stream_id: StreamId(5), flags: (0x5: END_HEADERS | END_STREAM) }
2022-12-20T09:09:22.636942Z DEBUG hyper::client::client: client connection error: connection error: broken pipe
Error: Did not find a matching file pattern on GitHub to install
If I change plugin json later then do I need to publish the new version of plugin with the same version in plugin json?
And also its taking the gz file path as https://github.com/sameena-ops/pact-sample-plugin/releases/download/v0.0.5/*pact*-pact-sample-plugin-plugin-windows-x86_64.exe.gz does it mean the entry point or somewhere i should give only sample instead of full project name.?
m
in your
pact-plugin.json
file, the name of your plugin shouldn’t be
pact-sample-plugin
but just
sample
the make actions should set the name of the plugin in
pact-plugin.json
based on the value of
PROJECT
in
Makefile
It’s possible there is a bug in that though, given it didn’t seem to update the version in the
pact-plugin.json
. If you can track down what happened and raise an issue, that would be great
s
yeah looks same what i have is
Copy code
{
  "pluginInterfaceVersion": 1,
  "name": "sample",
  "version": "0.0.5",
  "executableType": "exec",
  "minimumRequiredVersion": null,
  "entryPoint": "pact-sample-plugin",
  "entryPoints": {},
  "dependencies": null,
  "pluginConfig": {}
}
m
what does your makefile look like?
s
yeah version mismatch is there in make file # Update this version VERSION=0.0.4 # Update to your project name PROJECT=pact-sample-plugin
m
yep, the project name is wrong too (see above)
it should just be
sample
TL;DR - you shouldn’t need to manually touch
pact-plugin.json