- Fix the regular expression can not show correctly if the name having more then one "_".

Conflicts:
	tabs/firmware_flasher.js
10.3.x-maintenance
Larry (TBS) 2015-10-20 13:03:53 +08:00 committed by Dominic Clifton
parent 38e0d868c7
commit 5cc3608a61
1 changed files with 2 additions and 4 deletions

View File

@ -43,7 +43,7 @@ TABS.firmware_flasher.initialize = function (callback) {
var releaseDescriptors = []; var releaseDescriptors = [];
TABS.firmware_flasher.releases.forEach(function(release){ TABS.firmware_flasher.releases.forEach(function(release){
release.assets.forEach(function(asset){ release.assets.forEach(function(asset){
var targetFromFilenameExpression = /.*_(.*)\.(.*)/; var targetFromFilenameExpression = /w*_(.*)\.(.*)/;
var match = targetFromFilenameExpression.exec(asset.name); var match = targetFromFilenameExpression.exec(asset.name);
if (!showDevReleases && release.prerelease) { if (!showDevReleases && release.prerelease) {
@ -54,7 +54,7 @@ TABS.firmware_flasher.initialize = function (callback) {
return; return;
} }
var target = match[1]; var target = match[1].replace("_", "_");
var format = match[2]; var format = match[2];
if (format != 'hex') { if (format != 'hex') {
@ -530,5 +530,3 @@ TABS.firmware_flasher.cleanup = function (callback) {
if (callback) callback(); if (callback) callback();
}; };