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

Force packageSourceUrl to be package folder in git #1162

Merged

Conversation

mkevenaar
Copy link
Member

Description

Added script to force packageSourceUrl to be set to the package folder in the repo.

  • script based on the Update-IconUrl.ps1 script already in the repo

Motivation and Context

To assist someone to find the correct package source, the packageSourceUrl element has been added to the nuspec file. Sometimes only the (github) repo is added. This script forces the packageSourceUrl to be set to the /automatic/{{ packagename }} directory

How Has this Been Tested?

Already running for a while in my own chocolatey-packages repo

Screenshot (if appropriate, usually isn't needed):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Migrated package (a package has been migrated from another repository)

Checklist:

  • My code follows the code style of this repository.
  • My change requires a change to documentation (this usually means the notes in the description of a package).
  • I have updated the documentation accordingly (this usually means the notes in the description of a package).
  • All files are up to date with the latest Contributing Guidelines
  • The added/modified package passed install/uninstall in the chocolatey test environment.
  • The changes only affect a single package (not including meta package).

…r in the repo.

* script based on the `Update-IconUrl.ps1` script already in the repo
@AppVeyorBot
Copy link

✅ Package verification completed without issues. PR is now pending human review

@AdmiringWorm
Copy link
Member

While I see the usefulness of your script, I'm not completely sure about how useful it would be to have it run for every build.
Maybe a manual triggering of script would be enough (although the same could be said about my Update-IconUrl script though).

Still, I believe it warrants some discussion before we accept this PR.

/CC @majkinetor @gep13

@majkinetor
Copy link
Contributor

IMO, This should be AU plugin, available for all AU users, not only here. If implemented as AU plugin here we should just add it among update_all options. However, for this to work we must have plugins that run after each package is updated but before it is pushed: majkinetor/au#116

GithubRepository should default to $Env:github_user_repo because that is used by all scripts. $Env:au_root should be used as defualt for Package folder.

@AppVeyorBot
Copy link

✅ Package verification completed without issues. PR is now pending human review

@gep13
Copy link
Member

gep13 commented Dec 19, 2018

@AdmiringWorm this seems like a good suggestion. While waiting on the feature on AU, I don't see any problems with adding this here, but perhaps create another issue to extract this, and perhaps the Icon update, into a Plugin once it is ready?

@majkinetor
Copy link
Contributor

On 2nd thought, this can actually be made as AU plugin right now with minor problem that it will not work the first time since push to gallery happens before push to git repo. But next update, it will be correctly set.

This solution looks more complicated than needed and it reinvents some stuff AU already handles for all like loading of nuspec.

I guess there is no harm to merge it now here until I digest some stuff.

@majkinetor majkinetor merged commit dcd7afc into chocolatey-community:master Jan 7, 2019
@mkevenaar mkevenaar deleted the update-packagesource branch January 7, 2019 15:11
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.

5 participants