Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon Firmware Selector
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
FFS Gluon Firmware Selector
Commits
2d83874e
Commit
2d83874e
authored
Mar 11, 2017
by
codedust
Browse files
Options
Downloads
Patches
Plain Diff
Config parameter for version regex
parent
eaa374d0
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app.js
+7
-1
7 additions, 1 deletion
app.js
config_template.js
+2
-0
2 additions, 0 deletions
config_template.js
with
9 additions
and
1 deletion
app.js
+
7
−
1
View file @
2d83874e
...
@@ -113,6 +113,12 @@ var firmwarewizard = function() {
...
@@ -113,6 +113,12 @@ var firmwarewizard = function() {
var
reRemoveSpaces
=
new
RegExp
(
/ /g
);
var
reRemoveSpaces
=
new
RegExp
(
/ /g
);
var
reStripDashes
=
new
RegExp
(
/^
\-
+|
\-
+$/g
);
var
reStripDashes
=
new
RegExp
(
/^
\-
+|
\-
+$/g
);
if
(
config
.
version_regex
===
undefined
)
{
console
.
log
(
"
config.version_regex missing in config.js
"
);
return
;
}
var
reVersionRegex
=
new
RegExp
(
config
.
version_regex
);
function
buildVendorModelsReverse
()
{
function
buildVendorModelsReverse
()
{
var
vendormodels_reverse
=
{};
var
vendormodels_reverse
=
{};
...
@@ -281,7 +287,7 @@ var firmwarewizard = function() {
...
@@ -281,7 +287,7 @@ var firmwarewizard = function() {
function
findVersion
(
name
)
{
function
findVersion
(
name
)
{
// version with optional date in it (e.g. 0.8.0~20160502)
// version with optional date in it (e.g. 0.8.0~20160502)
var
m
=
/-
([
0-9
]
+.
[
0-9
]
+.
[
0-9
]
+
([
+-
][
0-9
]
+
)?(
~
[
a-z0-9
]
+
)?)[
.-
]
/
.
exec
(
name
);
var
m
=
reVersionRegex
.
exec
(
name
);
return
m
?
m
[
1
]
:
''
;
return
m
?
m
[
1
]
:
''
;
}
}
...
...
This diff is collapsed.
Click to expand it.
config_template.js
+
2
−
0
View file @
2d83874e
...
@@ -20,6 +20,8 @@ var config = {
...
@@ -20,6 +20,8 @@ var config = {
vendormodels
:
vendormodels
,
vendormodels
:
vendormodels
,
// community prefix of the firmware images
// community prefix of the firmware images
community_prefix
:
'
gluon-ffda-
'
,
community_prefix
:
'
gluon-ffda-
'
,
// firmware version regex
version_regex
:
'
-([0-9]+.[0-9]+.[0-9]+([+-~][0-9]+)?)[.-]
'
,
// relative image paths and branch
// relative image paths and branch
directories
:
{
directories
:
{
// some demo sources
// some demo sources
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment