@grafana/create-plugin 4.11.0 → 4.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v4.11.1 (Mon May 27 2024)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Create plugin: use existing executable name on update [#924](https://github.com/grafana/plugin-tools/pull/924) ([@oshirohugo](https://github.com/oshirohugo))
6
+
7
+ #### Authors: 1
8
+
9
+ - Hugo Kiyodi Oshiro ([@oshirohugo](https://github.com/oshirohugo))
10
+
11
+ ---
12
+
1
13
  # v4.11.0 (Mon May 27 2024)
2
14
 
3
15
  #### 🚀 Enhancement
@@ -117,6 +117,7 @@ export function getTemplateData(cliArgs) {
117
117
  useCypress,
118
118
  hasGithubWorkflows: isFile(path.join(githubFolder, 'ci.yml')),
119
119
  hasGithubLevitateWorkflow: isFile(path.join(githubFolder, 'is-compatible.yml')),
120
+ pluginExecutable: pluginJson.executable,
120
121
  };
121
122
  }
122
123
  debug('\nTemplate data:\n' + JSON.stringify(templateData, null, 2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/create-plugin",
3
- "version": "4.11.0",
3
+ "version": "4.11.1",
4
4
  "repository": {
5
5
  "directory": "packages/create-plugin",
6
6
  "url": "https://github.com/grafana/plugin-tools"
@@ -87,5 +87,5 @@
87
87
  "engines": {
88
88
  "node": ">=20"
89
89
  },
90
- "gitHead": "0115340dd531278b734bdfc171ce604b58e6afdc"
90
+ "gitHead": "d83fd4b1f45525fef2ab4eef488b83c8518ca0bf"
91
91
  }
package/src/types.ts CHANGED
@@ -32,4 +32,5 @@ export type TemplateData = {
32
32
  useCypress: boolean;
33
33
  hasGithubWorkflows: boolean;
34
34
  hasGithubLevitateWorkflow: boolean;
35
+ pluginExecutable?: string;
35
36
  };
@@ -164,6 +164,7 @@ export function getTemplateData(cliArgs?: GenerateCliArgs): TemplateData {
164
164
  useCypress,
165
165
  hasGithubWorkflows: isFile(path.join(githubFolder, 'ci.yml')),
166
166
  hasGithubLevitateWorkflow: isFile(path.join(githubFolder, 'is-compatible.yml')),
167
+ pluginExecutable: pluginJson.executable,
167
168
  };
168
169
  }
169
170
 
@@ -6,7 +6,7 @@ user=root
6
6
  user=root
7
7
  directory=/var/lib/grafana
8
8
  {{#if hasBackend}}
9
- command=bash -c 'while [ ! -f /root/{{ pluginId }}/dist/gpx_{{ snakeCase pluginName }}* ]; do sleep 1; done; /run.sh'
9
+ command=bash -c 'while [ ! -f /root/{{ pluginId }}/dist/{{#if pluginExecutable}}{{pluginExecutable}}{{else}}gpx_{{ snakeCase pluginName }}{{/if}}* ]; do sleep 1; done; /run.sh'
10
10
  {{else}}
11
11
  command=/run.sh
12
12
  {{/if}}
@@ -20,7 +20,7 @@ autostart=true
20
20
  {{#if hasBackend}}
21
21
  [program:delve]
22
22
  user=root
23
- command=/bin/bash -c 'pid=""; while [ -z "$pid" ]; do pid=$(pgrep -f gpx_{{ snakeCase pluginName }}); done; /root/go/bin/dlv attach --api-version=2 --headless --continue --accept-multiclient --listen=:2345 $pid'
23
+ command=/bin/bash -c 'pid=""; while [ -z "$pid" ]; do pid=$(pgrep -f {{#if pluginExecutable}}{{pluginExecutable}}{{else}}gpx_{{ snakeCase pluginName }}{{/if}}); done; /root/go/bin/dlv attach --api-version=2 --headless --continue --accept-multiclient --listen=:2345 $pid'
24
24
  stdout_logfile=/dev/fd/1
25
25
  stdout_logfile_maxbytes=0
26
26
  redirect_stderr=true