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

added upload command with ghp-rs #93

Merged
merged 4 commits into from
May 3, 2016

Conversation

LucioFranco
Copy link
Contributor

Last week I wrote a small gh-pages import library similar to ghp-import that was written in python. I have added a subcommand for cobalt. Let me know what you think @johannhof . I was also thinking it may be better to have it cobalt build --upload rather than cobalt upload.

@johannhof
Copy link
Contributor

Really nice! But the name upload isn't quite fitting since it will not actually push the changes to the server, right?

@LucioFranco
Copy link
Contributor Author

@johannhof I agree. I am very open to any suggestions.

@johannhof
Copy link
Contributor

Mmmmh maybe --gh-pages or --push-to-branch or --push-branch or --commit <branchname>

@florianjacob
Copy link

I've seen this being called publish (pelican) or deploy (nikola) in other static site generators.

@LucioFranco
Copy link
Contributor Author

@johannhof added some fixes. I went with import and build --import because this felt more natural to what it actually does. I want to let the user push to the correct repository for the moment. This also allows space for further expansion on the import command. Users can also use -m <commit-message> and --message <commit-message>. The same can be done for the branch option.

@@ -28,9 +30,10 @@ fn print_version() {
}

fn print_usage(opts: Options) {
let usage = concat!("\n\tbuild -- build the cobalt project at the source dir",
let usage = concat!("\n\tbuild -- build the cobalt project at the source dir, -i --import will import the site to the gh-pages branch",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why add the --import instruction here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johannhof so you can run cobalt build -b src -d build --import and it will build then import. It would be useful for ci tools to do it all in one command.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I meant you already documented it below, I think documenting it in that line is unnecessary :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm I see what you are saying I will remove it then merge.

@johannhof
Copy link
Contributor

@LucioFranco looks great, I had one comment but good to merge otherwise!

@LucioFranco LucioFranco merged commit 1bf4834 into cobalt-org:master May 3, 2016
@LucioFranco LucioFranco deleted the doc-upload branch May 3, 2016 05:49
@johannhof
Copy link
Contributor

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants