mirror of https://github.com/embarklabs/embark.git
fix version issue causing a contract to be undefined due to a pipeline error
This commit is contained in:
parent
9582efbe65
commit
df765ed056
|
@ -49,7 +49,7 @@ class Npm {
|
||||||
let tarball = registryJSON.dist.tarball;
|
let tarball = registryJSON.dist.tarball;
|
||||||
|
|
||||||
let packageDirectory = './.embark/versions/' + packageName + '/' + version + '/';
|
let packageDirectory = './.embark/versions/' + packageName + '/' + version + '/';
|
||||||
if (fs.existsSync(packageDirectory + "/downloaded_package.tgz")) {
|
if (fs.existsSync(packageDirectory + "/downloaded_package.tgz") && fs.existsSync(packageDirectory + "package.json")) {
|
||||||
if (returnContent) {
|
if (returnContent) {
|
||||||
let distFile = packageDirectory + returnContent;
|
let distFile = packageDirectory + returnContent;
|
||||||
callback(null, fs.readFileSync(distFile).toString());
|
callback(null, fs.readFileSync(distFile).toString());
|
||||||
|
@ -79,7 +79,7 @@ class Npm {
|
||||||
let npmRegistry = "https://registry.npmjs.org/" + packageName + "/" + version;
|
let npmRegistry = "https://registry.npmjs.org/" + packageName + "/" + version;
|
||||||
let packageDirectory = './.embark/versions/' + packageName + '/' + version + '/';
|
let packageDirectory = './.embark/versions/' + packageName + '/' + version + '/';
|
||||||
|
|
||||||
if (fs.existsSync(packageDirectory)) {
|
if (fs.existsSync(packageDirectory) && fs.existsSync(packageDirectory + "package.json")) {
|
||||||
let content;
|
let content;
|
||||||
if (getFromGit && returnContent) {
|
if (getFromGit && returnContent) {
|
||||||
let distFile = packageDirectory + packageName + ".js";
|
let distFile = packageDirectory + packageName + ".js";
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import EmbarkJS from 'Embark/EmbarkJS';
|
import EmbarkJS from 'Embark/EmbarkJS';
|
||||||
//import SimpleStorage from 'Embark/contracts/SimpleStorage';
|
import SimpleStorage from 'Embark/contracts/SimpleStorage';
|
||||||
import Test from 'Embark/contracts/Test';
|
import Test from 'Embark/contracts/Test';
|
||||||
import Assert from 'Embark/contracts/Assert';
|
import Assert from 'Embark/contracts/Assert';
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ import 'bootstrap/dist/js/bootstrap.min.js';
|
||||||
import { Navbar, Jumbotron, Button } from 'react-bootstrap';
|
import { Navbar, Jumbotron, Button } from 'react-bootstrap';
|
||||||
|
|
||||||
window.EmbarkJS = EmbarkJS;
|
window.EmbarkJS = EmbarkJS;
|
||||||
//window.SimpleStorage = SimpleStorage;
|
window.SimpleStorage = SimpleStorage;
|
||||||
window.Test = Test;
|
window.Test = Test;
|
||||||
window.Assert = Assert;
|
window.Assert = Assert;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"default": {
|
"default": {
|
||||||
"versions": {
|
"versions": {
|
||||||
"web3.js": "1.0.0-beta.27",
|
"web3.js": "1.0.0-beta.27",
|
||||||
"solc": "0.4.17"
|
"solc": "0.4.18"
|
||||||
},
|
},
|
||||||
"deployment": {
|
"deployment": {
|
||||||
"host": "localhost",
|
"host": "localhost",
|
||||||
|
|
Loading…
Reference in New Issue