fix gh-pages bloat
This commit is contained in:
parent
40eb44eae4
commit
4c21197963
22
make.js
Executable file → Normal file
22
make.js
Executable file → Normal file
@ -255,21 +255,19 @@ target.bundle = function() {
|
|||||||
target.pagesrepo = function() {
|
target.pagesrepo = function() {
|
||||||
cd(ROOT_DIR);
|
cd(ROOT_DIR);
|
||||||
echo();
|
echo();
|
||||||
echo('### Creating fresh clone of gh-pages');
|
echo('### Creating a fresh git repo for gh-pages');
|
||||||
|
|
||||||
if (!test('-d', BUILD_DIR))
|
if (test('-d', GH_PAGES_DIR))
|
||||||
mkdir(BUILD_DIR);
|
rm('-rf', GH_PAGES_DIR);
|
||||||
|
|
||||||
if (!test('-d', GH_PAGES_DIR)) {
|
mkdir('-p', GH_PAGES_DIR);
|
||||||
echo();
|
var oldDir = pwd();
|
||||||
echo('Cloning project repo...');
|
cd(GH_PAGES_DIR);
|
||||||
echo('(This operation can take a while, depending on network conditions)');
|
exec('git init');
|
||||||
exec('git clone -b gh-pages --depth=1 ' + REPO + ' ' + GH_PAGES_DIR,
|
exec('git remote add origin ' + REPO);
|
||||||
{silent: true});
|
exec('git checkout --orphan gh-pages');
|
||||||
echo('Done.');
|
cd(oldDir);
|
||||||
}
|
|
||||||
|
|
||||||
rm('-rf', GH_PAGES_DIR + '/*');
|
|
||||||
mkdir('-p', GH_PAGES_DIR + '/web');
|
mkdir('-p', GH_PAGES_DIR + '/web');
|
||||||
mkdir('-p', GH_PAGES_DIR + '/web/images');
|
mkdir('-p', GH_PAGES_DIR + '/web/images');
|
||||||
mkdir('-p', GH_PAGES_DIR + BUILD_DIR);
|
mkdir('-p', GH_PAGES_DIR + BUILD_DIR);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user