-
Notifications
You must be signed in to change notification settings - Fork 104
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
pdk update and convert fixes #433
Conversation
lib/pdk/module/update.rb
Outdated
data = GIT_DESCRIBE_PATTERN.match(current_template_version) | ||
|
||
return version if data.nil? | ||
return version unless version.include?('/') | ||
|
||
branch = version.partition('/').last if version.include?('/') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we care about branches with /
's in the name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The git ref we pull from repos shows up as 'origin/master' or 'refs/heads/master'.
When doing starting an update, pdk needs to be able to handle refs that are tags or branch heads and be able to compare sha when they are branches.
Bryan and I talked about this more, we think long-term we can stop comparing the refs altogether and just check to see if there are pending changes and report the version of the template that was used, but this works for now. |
… and default ref is a tag
Fixes two problems: