Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace-gitcafe-with-coding #64

Merged
merged 1 commit into from
Mar 29, 2017
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ deploy:
message: [message]
repo:
github: <repository url>,[branch]
gitcafe: <repository url>,[branch]
coding: <repository url>,[branch]
extend_dirs:
- [extend directory]
- [another extend directory]
Expand Down
4 changes: 2 additions & 2 deletions lib/parse_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ function parseRepo(repo) {

if (host === 'github.com') {
branch = rGithubPage.test(path) ? 'master' : 'gh-pages';
} else if (host === 'gitcafe.com') {
branch = 'gitcafe-pages';
} else if (host === 'coding.net') {
branch = 'coding-pages';
}
}

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
"mocha": "^2.5.3"
},
"dependencies": {
"bluebird": "^3.4.1",
"bluebird": "^3.5.0",
"chalk": "^1.1.3",
"hexo-fs": "^0.1.6",
"hexo-util": "^0.6.0",
"moment": "^2.13.0",
"moment": "^2.18.0",
"swig": "^1.4.2"
}
}
}
18 changes: 9 additions & 9 deletions test/parse_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,26 +91,26 @@ describe('parse config', function() {
})[0].branch.should.eql('site');
});

it('gitcafe repo, gitcafe-pages branch', function() {
it('coding repo, coding-pages branch', function() {
// https
parseConfig({
repo: 'https://gitcafe.com/hexojs/hexojs.git'
})[0].branch.should.eql('gitcafe-pages');
repo: 'https://coding.net/hexojs/hexojs.git'
})[0].branch.should.eql('coding-pages');

// git
parseConfig({
repo: 'git://gitcafe.com/hexojs/hexojs.git'
})[0].branch.should.eql('gitcafe-pages');
repo: 'git://coding.net/hexojs/hexojs.git'
})[0].branch.should.eql('coding-pages');

// ssh
parseConfig({
repo: 'git@gitcafe.com/hexojs/hexojs.git'
})[0].branch.should.eql('gitcafe-pages');
repo: 'git@coding.net/hexojs/hexojs.git'
})[0].branch.should.eql('coding-pages');
});

it('gitcafe repo, custom branch', function() {
it('coding, custom branch', function() {
parseConfig({
repo: 'https://gitcafe.com/hexojs/hexojs.git',
repo: 'https://coding.net/hexojs/hexojs.git',
branch: 'site'
})[0].branch.should.eql('site');
});
Expand Down