-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#764) Ensure --puppet-dev checkout is always updated
The original issue was that `pdk console --puppet-dev` didn't update the checkout before using it. This is because the CLI for `pdk console` didn't call `PDK::Util::PuppetVersion.fetch_puppet_dev`. Rather than add that, I've opted to add this call to the logic in `PDK::CLI::Util.puppet_from_opts_or_env` so that it happens automatically when setting up the environment for puppet-dev. --- First run to seed the checkout ``` $ pdk console --puppet-dev pdk (WARN): Module fixtures not found, please run pdk bundle exec rake spec_prep. [✔] Installing missing Gemfile dependencies. Ruby Version: 2.4.7 Puppet Version: 6.10.1 Puppet Debugger Version: 0.15.1 Created by: NWOps <corey@nwops.io> Type "commands" for a list of debugger commands or "help" to show the help screen. 1:>> ``` Manually switch the checkout to Puppet 6.9.0 ``` $ git -C ~/.pdk/cache/src/puppet checkout 6.9.0 Note: switching to '6.9.0'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c <new-branch-name> Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false HEAD is now at c2ccdd4efe Merge pull request #7706 from gimmyxd/PUP-10016 ``` Second run, showing that the checkout has been updated to the HEAD of origin/master (at time of writing, Puppet 6.10.1) ``` $ pdk console --puppet-dev pdk (WARN): Module fixtures not found, please run pdk bundle exec rake spec_prep. [✔] Installing missing Gemfile dependencies. Ruby Version: 2.4.7 Puppet Version: 6.10.1 Puppet Debugger Version: 0.15.1 Created by: NWOps <corey@nwops.io> Type "commands" for a list of debugger commands or "help" to show the help screen. 1:>> ``` Fixes #764
- Loading branch information
Showing
7 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters