Skip to content
This repository was archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
Decoupling interface build for appveyor workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
evertonfraga committed Jul 27, 2018
1 parent d748d25 commit 1ed49c3
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ interface/.meteor/dev_bundle
interface/.meteor/public/
dist_wallet/
dist_mist/
.interface/
nodes/geth/
config.json
mist.log
Expand Down
10 changes: 6 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ install:
- yarn install

test_script:
- yarn build:mist --win --skipTasks=bundling-interface
- yarn gulp --wallet --win --skipTasks=bundling-interface
- cd interface && meteor-build-client ../build/interface -p ""

- yarn build:mist --win --skipTasks=build-interface
- yarn gulp --wallet --win --skipTasks=build-interface
- yarn test:unit:once
- yarn task upload-queue --mist
- yarn task upload-queue --wallet
- yarn dist:mist
- yarn dist:wallet

build: off

Expand Down
13 changes: 10 additions & 3 deletions gulpTasks/building.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ gulp.task('pack-wallet', cb => {
cb();
});
});

// Currently, Mist and Ethereum Wallet expects ./wallet/ to be in different paths. This task aims to fulfill this requirement.
gulp.task('move-wallet', cb => {
if (type === 'wallet') {
Expand All @@ -99,10 +100,10 @@ gulp.task('move-wallet', cb => {
cb();
});

gulp.task('bundling-interface', cb => {
const buildPath = path.join('..', `dist_${type}`, 'app', 'interface');
gulp.task('build-interface', cb => {
const interfaceBuildPath = path.resolve('.interface');
exec(
`meteor-build-client ${buildPath} -p ""`,
`meteor-build-client ${interfaceBuildPath} -p ""`,
{ cwd: 'interface' },
(err, stdout) => {
console.log(stdout);
Expand All @@ -111,6 +112,12 @@ gulp.task('bundling-interface', cb => {
);
});

gulp.task('copy-interface', () => {
const interfaceBuildPath = path.resolve('.interface');
const interfaceDistPath = path.resolve(`dist_${type}`, 'app', 'interface');
return gulp.src([interfaceBuildPath]).pipe(gulp.dest(interfaceDistPath));
});

gulp.task('copy-i18n', () => {
return gulp
.src(['./interface/i18n/*.*', './interface/project-tap.i18n'], {
Expand Down
3 changes: 2 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ const tasks = [
'transpile-modules',
'copy-build-folder-files',
'switch-production',
'bundling-interface',
'build-interface',
'copy-interface',
'move-wallet',
'copy-i18n',
'build-dist',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test:e2e": "gulp test",
"build:wallet": "gulp --wallet",
"build:mist": "gulp --mist",
"build:interface": "meteor-build-client",
"build:interface": "cd interface && meteor-build-client ../.interface -p ''",
"dist:mist": "gulp upload-queue --mist",
"dist:wallet": "gulp upload-queue --wallet",
"task": "gulp"
Expand Down

0 comments on commit 1ed49c3

Please sign in to comment.