Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 32b1a0c

Browse files
committedFeb 8, 2018
chore(docs.angularjs.org): actually fix deployment
When a file is symlinked, relative paths obviously aren't correct anymore. This error was masked because Travis didn't fail the job when Firebase couldn't find the public folder. To fix, we copy the file and adjust the folder path
1 parent 9a0f1ab commit 32b1a0c

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed
 

Diff for: ‎Gruntfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ module.exports = function(grunt) {
463463
'package',
464464
'compress:deployFirebaseCode',
465465
'copy:deployFirebaseCode',
466-
'shell:symlink-firebase-docs',
466+
'firebaseDocsJsonForTravis',
467467
'copy:deployFirebaseDocs'
468468
]);
469469
grunt.registerTask('default', ['package']);

Diff for: ‎lib/grunt/plugins.js

+5
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,9 @@ module.exports = function(grunt) {
6262
grunt.registerTask('collect-errors', 'Combine stripped error files', function() {
6363
util.collectErrors();
6464
});
65+
66+
grunt.registerTask('firebaseDocsJsonForTravis', function() {
67+
util.firebaseDocsJsonForTravis();
68+
});
69+
6570
};

Diff for: ‎lib/grunt/utils.js

+11
Original file line numberDiff line numberDiff line change
@@ -292,5 +292,16 @@ module.exports = {
292292
}
293293
next();
294294
};
295+
},
296+
297+
// Our Firebase projects are in subfolders, but Travis expects them in the root,
298+
// so we need to modify the upload folder path and copy the file into the root
299+
firebaseDocsJsonForTravis: function() {
300+
var fileName = 'scripts/docs.angularjs.org-firebase/firebase.json';
301+
var json = grunt.file.readJSON(fileName);
302+
303+
json.hosting.public = 'uploadDocs';
304+
305+
grunt.file.write('firebase.json', JSON.stringify(json));
295306
}
296307
};

0 commit comments

Comments
 (0)
This repository has been archived.