Remove release sorting (already done by solc-bin)

pull/1/head
Alex Beregszaszi 8 years ago
parent 399481f6d7
commit 91c89c9cea
  1. 1
      package.json
  2. 19
      src/app.js

@ -31,7 +31,6 @@
"js-base64": "^2.1.9",
"nightwatch": "^0.9.3",
"semistandard": "^7.0.0",
"semver": "^5.3.0",
"solc": "https://github.com/ethereum/solc-js",
"tape": "^4.5.1",
"web3": "https://github.com/ethereum/web3.js#35bcace7173fda742ddb1bba84c8a70f0fa849e0",

@ -2,7 +2,6 @@
'use strict';
var $ = require('jquery');
var semver = require('semver');
var base64 = require('js-base64').Base64;
var utils = require('./app/utils');
@ -555,22 +554,8 @@ var run = function () {
});
$.getJSON('https://ethereum.github.io/solc-bin/bin/list.json').done(function (data) {
function buildVersion (build) {
if (build.prerelease && build.prerelease.length > 0) {
return build.version + '-' + build.prerelease;
} else {
return build.version;
}
}
// Sort builds according to semver
var builds = data.builds.sort(function (a, b) {
// NOTE: b vs. a (the order is important), because we want latest first in the list
return semver.compare(buildVersion(b), buildVersion(a));
});
// populate version dropdown with all available compiler versions
$.each(builds, function (i, build) {
// populate version dropdown with all available compiler versions (descending order)
$.each(data.builds.slice().reverse(), function (i, build) {
$('#versionSelector').append(new Option(buildVersion(build), build.path));
});

Loading…
Cancel
Save