Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Fix build #1578

Merged
merged 2 commits into from Dec 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -10,6 +10,7 @@ before_install:
- docker pull ethereum/solc:0.4.22
- sudo add-apt-repository --yes ppa:ethereum/ethereum
- sudo apt-get update
- sudo apt-get install -y dpkg
- sudo apt-get install solc jq snapd
- export PATH=$PATH:/snap/bin
- sudo snap install vyper --edge --devmode
Expand Down Expand Up @@ -48,4 +49,4 @@ notifications:
slack:
secure: cm12Kcc8YmtZ0TZ7T6t+kZqKNrpKG7D4MyaJLWf0llHeGTUqldIaSkLTasqCnBEUhg2/uqQ1dbG8nuqhnov9rHhRFUQmZPVUqiCE90wLDo2qIC9l98sXQRT/yrRgr1W7d3Jfauq53B2WBUpS5LBzcfYgzj13PBcmKtX2+wBZTLddmfcqZUwqzXRL9TPWUQrecAVSQZBVutZ6tQaxTAdBUbyobf6kXYHYRVOJQp7xtHUAIFULitpvCG6cH2F6L+G4gSqDykx74V8bScCvBe0TW8ue5zxbSoM5UmgSMIXzYMBCWa+/WzNjwvCAYScKkqoWt0mk5nzUOQZgndyyO/nA7Ylo7Za1b/LzChgYHB/TybxmF2Jul/MkHy614l/W4Z3dRRXMuPNmY3JIkuYej/9m/uqoLHqEyka8h6YJfZ7IPQ11Kg0r6XZiy+G2sZTg6BW5TIy1GvwDWhZ8hyLk/ka+4JMUK7/gOtAzUUiMIUFwXpgyLnTHzbCF547mx5yJbkeGzJ1Faiq50LcnI8SswP+VQrwgJr2pMfcCXyPyJmZZmRXxOP3qvaYBbfEtSHuIp00DSNITa9dDxZUKiBuzbCJuZ2ChYY12rV4/6EZsu1FhXKPfN735uVqz+HJD/YsvpfAoZ4jTGikMNrIRKfAYLCewkWpsDN51mgO4TBPcbrQ8FbI=
on_success: change
on_failure: always
on_failure: always
2 changes: 1 addition & 1 deletion packages/truffle-box/box.js
Expand Up @@ -93,7 +93,7 @@ const Box = {
self
.unbox("https://github.com/trufflesuite/truffle-init-" + name, dir)
.then(function() {
var config = Config.load(path.join(dir, "truffle.js"), {});
var config = Config.load(path.join(dir, "truffle-config.js"), {});
callback(null, config);
})
.catch(callback);
Expand Down
14 changes: 7 additions & 7 deletions packages/truffle-box/test/box.js
Expand Up @@ -27,7 +27,7 @@ describe("truffle-box Box", () => {
assert.ok(truffleConfig);

assert(
fs.existsSync(path.join(destination, "truffle.js")),
fs.existsSync(path.join(destination, "truffle-config.js")),
"Unboxed project should have truffle config."
);
});
Expand Down Expand Up @@ -85,7 +85,7 @@ describe("truffle-box Box", () => {
assert.ok(truffleConfig);

assert(
fs.existsSync(path.join(destination, "truffle.js")),
fs.existsSync(path.join(destination, "truffle-config.js")),
"Unboxed project should have truffle config."
);
done();
Expand All @@ -101,27 +101,27 @@ describe("truffle-box Box", () => {
});

it("overwrites redundant files if init/unbox force flag used", done => {
const truffleConfigPath = path.join(destination, "truffle.js");
const truffleConfigPath = path.join(destination, "truffle-config.js");

// preconditions
fs.writeFileSync(
truffleConfigPath,
"this truffle.js file is different than the default box file",
"this truffle-config.js file is different than the default box file",
"utf8"
);
assert(
fs.existsSync(truffleConfigPath),
"mock truffle.js wasn't created!"
"mock truffle-config.js wasn't created!"
);
const mockConfig = fs.readFileSync(truffleConfigPath, "utf8");

Box.unbox(TRUFFLE_BOX_DEFAULT, destination, { force: true }).then(() => {
assert(
fs.existsSync(truffleConfigPath),
"truffle.js wasn't recreated!"
"truffle-config.js wasn't recreated!"
);
const newConfig = fs.readFileSync(truffleConfigPath, "utf8");
assert(newConfig !== mockConfig, "truffle.js wasn't overwritten!");
assert(newConfig !== mockConfig, "truffle-config.js wasn't overwritten!");
done();
});
});
Expand Down