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
9f4bca50
Commit
9f4bca50
authored
Mar 12, 2019
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated code stats collection
parent
94677ba8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
scripts/circle-metrics.sh
+12
-5
scripts/circle-test-frontend.sh
+6
-1
No files found.
scripts/circle-metrics.sh
View file @
9f4bca50
#!/bin/bash
echo
"Collecting code stats (typescript errors & more)"
ERROR_COUNT
=
"
$(
./node_modules/.bin/tsc
--project
tsconfig.json
--noEmit
--noImplicitAny
true
|
grep
-oP
'Found \K(\d+)'
)
"
DIRECTIVES
=
"
$(
grep
-r
-o
directive public/app/
**
/
*
| wc
-l
)
"
CONTROLLERS
=
"
$
{
grep
-r -oP \
"class .*Ctrl
\"
public/app/**/* | wc -l}
"
CONTROLLERS
=
"
$
(
grep
-r
-oP
'class .*Ctrl'
public/app/
**
/
*
| wc
-l
)
"
echo
"Typescript errors:
$ERROR_COUNT
"
echo
"Directives:
$DIRECTIVES
"
echo
"Controllers:
$CONTROLLERS
"
curl
\
-d
"{
\"
metrics
\"
:{
\"
noImplicitAny
\"
:
$ERROR_COUNT
}}"
\
-H
"Content-Type: application/json"
\
-u ci
:
$CIRCLE_STATS
\
-X POST https
://stats.grafana.org/metric-receiver
-d
"{
\"
metrics
\"
: {
\"
ci.code.noImplicitAny
\"
:
$ERROR_COUNT
,
\"
ci.code.directives
\"
:
$DIRECTIVES
,
\"
ci.code.controllers
\"
:
$CONTROLLERS
}
}"
\
-H
"Content-Type: application/json"
\
-u
ci:
$CIRCLE_STATS_PWD
\
-X
POST https://stats.grafana.org/metric-receiver
scripts/circle-test-frontend.sh
View file @
9f4bca50
...
...
@@ -10,6 +10,11 @@ function exit_if_fail {
fi
}
exit_if_fail ./scripts/circle-metrics.sh
exit_if_fail npm run prettier:check
exit_if_fail npm run
test
# On master also collect some and send some metrics
branch
=
"
$(
git rev-parse
--abbrev-ref
HEAD
)
"
if
[
"
${
branch
}
"
==
"master"
]
;
then
exit_if_fail ./scripts/circle-metrics.sh
fi
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