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

[ci] Rake task to run git-cop locally #3693

Merged
merged 1 commit into from
Aug 31, 2017
Merged

[ci] Rake task to run git-cop locally #3693

merged 1 commit into from
Aug 31, 2017

Conversation

Ana06
Copy link
Member

@Ana06 Ana06 commented Aug 29, 2017

Create a rake task to run git-cop and document it. :bowtie:

image

@Ana06 Ana06 added Frontend Things related to the OBS RoR app Test Suite / CI 💉 Things related to our tests/CI labels Aug 29, 2017
@Ana06 Ana06 requested a review from evanrolfe August 29, 2017 07:59
Create a rake task to run git-cop and document it.
@Ana06
Copy link
Member Author

Ana06 commented Aug 29, 2017

task :git_cop do
puts "\nCopying configuration file into ~/.config/git-cop/configuration.yml"
sh "mkdir -p ~/.config/git-cop"
sh "cp ../../dist/git-cop_configuration.yml ~/.config/git-cop/configuration.yml"
Copy link
Member

Choose a reason for hiding this comment

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

What if I already have this file and why is this user specific? Isn't it rather project specific?

Copy link
Member Author

Choose a reason for hiding this comment

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

What if I already have this file?

This will overwrite it. It is the only way to ensure that you are using the last version of the configuration file.

why is this user specific? Isn't it rather project specific?

This comes from the gem, I asked the same: https://github.com/bkuhlmann/git-cop/issues/3

Copy link
Member

Choose a reason for hiding this comment

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

nitpick: I would prefer to use ruby here (in a rake task), instead of bash.

Regarding the overwrite, how about a confirmation dialogue? We could check if the files differ and if so ask for confirmation before overwriting the old conf

Copy link
Member Author

Choose a reason for hiding this comment

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

@bgeuken

I would prefer to use ruby here (in a rake task), instead of bash.

And how do you want to do this?

Regarding the overwrite, how about a confirmation dialogue? We could check if the files differ and if so ask for confirmation before overwriting the old conf

But I would say that we want that the run configuration is always the one we have inside our project, so I really think all this is not needed and would be annoying.

Choose a reason for hiding this comment

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

Personally I dont see any problem with using bash to copy the files and such.

Copy link
Member

Choose a reason for hiding this comment

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

Alright, I can live with it I guess...

Copy link

@evanrolfe evanrolfe left a comment

Choose a reason for hiding this comment

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

[Nitpick] I agree with Henne that it would be nicer not to have to overwrite the config file every time but if its not easy to change that then I dont think its worth spending a lot of time on that since this is just a tool for development.

LGTM

@Ana06 Ana06 merged commit 0dc6173 into openSUSE:master Aug 31, 2017
@Ana06 Ana06 deleted the git-cop-task branch October 6, 2018 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend Things related to the OBS RoR app Test Suite / CI 💉 Things related to our tests/CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants