Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
e3922c6e
Commit
e3922c6e
authored
Nov 01, 2019
by
Andreas Motl
Committed by
Ryan McKinley
Oct 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grafana/toolkit: Fixup save artifacts in a zip id in the folder (#20071) (#20139)
parent
f0b3dc22
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
packages/grafana-toolkit/src/cli/tasks/plugin.ci.ts
+5
-5
No files found.
packages/grafana-toolkit/src/cli/tasks/plugin.ci.ts
View file @
e3922c6e
...
@@ -130,7 +130,7 @@ const packagePluginRunner: TaskRunner<PluginCIOptions> = async () => {
...
@@ -130,7 +130,7 @@ const packagePluginRunner: TaskRunner<PluginCIOptions> = async () => {
const
start
=
Date
.
now
();
const
start
=
Date
.
now
();
const
ciDir
=
getCiFolder
();
const
ciDir
=
getCiFolder
();
const
packagesDir
=
path
.
resolve
(
ciDir
,
'packages'
);
const
packagesDir
=
path
.
resolve
(
ciDir
,
'packages'
);
le
t
distDir
=
path
.
resolve
(
ciDir
,
'dist'
);
cons
t
distDir
=
path
.
resolve
(
ciDir
,
'dist'
);
const
docsDir
=
path
.
resolve
(
ciDir
,
'docs'
);
const
docsDir
=
path
.
resolve
(
ciDir
,
'docs'
);
const
grafanaEnvDir
=
path
.
resolve
(
ciDir
,
'grafana-test-env'
);
const
grafanaEnvDir
=
path
.
resolve
(
ciDir
,
'grafana-test-env'
);
await
execa
(
'rimraf'
,
[
packagesDir
,
distDir
,
grafanaEnvDir
]);
await
execa
(
'rimraf'
,
[
packagesDir
,
distDir
,
grafanaEnvDir
]);
...
@@ -139,7 +139,7 @@ const packagePluginRunner: TaskRunner<PluginCIOptions> = async () => {
...
@@ -139,7 +139,7 @@ const packagePluginRunner: TaskRunner<PluginCIOptions> = async () => {
// Updating the dist dir to have a pluginId named directory in it
// Updating the dist dir to have a pluginId named directory in it
// The zip needs to contain the plugin code wrapped in directory with a pluginId name
// The zip needs to contain the plugin code wrapped in directory with a pluginId name
distDir
=
path
.
resolve
(
ciDir
,
`dist/
${
getPluginId
()}
`
);
const
distContentDir
=
path
.
resolve
(
distDir
,
getPluginId
()
);
fs
.
mkdirSync
(
grafanaEnvDir
);
fs
.
mkdirSync
(
grafanaEnvDir
);
console
.
log
(
'Build Dist Folder'
);
console
.
log
(
'Build Dist Folder'
);
...
@@ -147,7 +147,7 @@ const packagePluginRunner: TaskRunner<PluginCIOptions> = async () => {
...
@@ -147,7 +147,7 @@ const packagePluginRunner: TaskRunner<PluginCIOptions> = async () => {
// 1. Check for a local 'dist' folder
// 1. Check for a local 'dist' folder
const
d
=
path
.
resolve
(
process
.
cwd
(),
'dist'
);
const
d
=
path
.
resolve
(
process
.
cwd
(),
'dist'
);
if
(
fs
.
existsSync
(
d
))
{
if
(
fs
.
existsSync
(
d
))
{
await
execa
(
'cp'
,
[
'-rn'
,
d
+
'/.'
,
distDir
]);
await
execa
(
'cp'
,
[
'-rn'
,
d
+
'/.'
,
dist
Content
Dir
]);
}
}
// 2. Look for any 'dist' folders under ci/job/XXX/dist
// 2. Look for any 'dist' folders under ci/job/XXX/dist
...
@@ -156,7 +156,7 @@ const packagePluginRunner: TaskRunner<PluginCIOptions> = async () => {
...
@@ -156,7 +156,7 @@ const packagePluginRunner: TaskRunner<PluginCIOptions> = async () => {
const
contents
=
path
.
resolve
(
ciDir
,
'jobs'
,
j
,
'dist'
);
const
contents
=
path
.
resolve
(
ciDir
,
'jobs'
,
j
,
'dist'
);
if
(
fs
.
existsSync
(
contents
))
{
if
(
fs
.
existsSync
(
contents
))
{
try
{
try
{
await
execa
(
'cp'
,
[
'-rn'
,
contents
+
'/.'
,
distDir
]);
await
execa
(
'cp'
,
[
'-rn'
,
contents
+
'/.'
,
dist
Content
Dir
]);
}
catch
(
er
)
{
}
catch
(
er
)
{
throw
new
Error
(
'Duplicate files found in dist folders'
);
throw
new
Error
(
'Duplicate files found in dist folders'
);
}
}
...
@@ -164,7 +164,7 @@ const packagePluginRunner: TaskRunner<PluginCIOptions> = async () => {
...
@@ -164,7 +164,7 @@ const packagePluginRunner: TaskRunner<PluginCIOptions> = async () => {
}
}
console
.
log
(
'Save the source info in plugin.json'
);
console
.
log
(
'Save the source info in plugin.json'
);
const
pluginJsonFile
=
path
.
resolve
(
distDir
,
'plugin.json'
);
const
pluginJsonFile
=
path
.
resolve
(
dist
Content
Dir
,
'plugin.json'
);
const
pluginInfo
=
getPluginJson
(
pluginJsonFile
);
const
pluginInfo
=
getPluginJson
(
pluginJsonFile
);
pluginInfo
.
info
.
build
=
await
getPluginBuildInfo
();
pluginInfo
.
info
.
build
=
await
getPluginBuildInfo
();
fs
.
writeFile
(
pluginJsonFile
,
JSON
.
stringify
(
pluginInfo
,
null
,
2
),
err
=>
{
fs
.
writeFile
(
pluginJsonFile
,
JSON
.
stringify
(
pluginInfo
,
null
,
2
),
err
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment