cms-sw / cms-git-tools

CMS Git Helpers
34 stars 26 forks source link

Add bash completion for `git cms-addpkg` #127

Closed fwyzard closed 1 month ago

fwyzard commented 4 months ago

The completion is available for both git-cms-addpkg and git cms-addpkg.

cmsbuild commented 4 months ago

A new Pull Request was created by @fwyzard for branch master.

@cmsbuild, @iarspider, @smuzaffar, @aandvalenzuela can you please review it and eventually sign? Thanks. @sextonkennedy, @antoniovilela, @rappoccio you are the release manager for this. cms-bot commands are listed here

cmsbuild commented 4 months ago

cms-bot internal usage

smuzaffar commented 1 month ago

@fwyzard , sorry I missed this.

I have tested it locally and it works fine if I have already done it git cms-init and I am in src directory. As all git-cms tools are suppose to work under cmsenv so may be if one is not under src then first do a cd $CMSSW_BASE ?

fwyzard commented 1 month ago

As all git-cms tools are suppose to work under cmsenv so may be if one is not under src then first do a cd $CMSSW_BASE ?

Good point.

smuzaffar commented 1 month ago

Also can you please move it under share/etc/profile.d/S99cms-git-tools-completion.sh . Then we can just rsync this share/etc/profile.d to /cvmfs/cms.cern.ch/share/etc/profile.d which contains the scripts automatically sources by cmsset_default.sh

fwyzard commented 1 month ago

Just to double check, I should create a new directory share/etc/profile.d/ and move the file there, correct ?

cmsbuild commented 1 month ago

Pull request #127 was updated.

smuzaffar commented 1 month ago

Just to double check, I should create a new directory share/etc/profile.d/ and move the file there, correct ?

yes, that is correct. By the way, does this work for CentOs7 ? I get strange results when run under cc7 releases ( may be it is git or bash version issue)

fwyzard commented 1 month ago

I've made three changes:

fwyzard commented 1 month ago

From a quick test on CentOS 7.9 (in a cmssw-el7 container), the completion for git-cms-addpkg is working, while the completion for git cms-addpkg does not work.

But I don't get any completion for any of the native git commands, either.

fwyzard commented 1 month ago

please test

cmsbuild commented 1 month ago

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-b7626f/41744/summary.html COMMIT: df187cc63a0071dc1bb71e2d38d6ab5fb6049077 CMSSW: CMSSW_14_2_X_2024-09-24-2300/el8_amd64_gcc12 User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cms-git-tools/127/41744/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-b7626f/41744/git-recent-commits.json https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-b7626f/41744/git-merge-result

Comparison Summary

Summary:

smuzaffar commented 1 month ago

+externals

this needs to be tested via cmsdist PR (with changes to deploy this new script)

cmsbuild commented 1 month ago

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @antoniovilela, @sextonkennedy, @rappoccio, @mandrenguyen (and backports should be raised in the release meeting by the corresponding L2)