Skip to content

Be clearer on the expectations of running the automation scripts #2746

@pauby

Description

@pauby

Checklist

  • I have verified that this is the correct repository, and the package is maintained by the chocolatey-community user.
  • I have verified that this is happening in the latest available version of the package.

NOTE: I was asked to raise this issue here.

Current Behaviour

Recently working to try to pull this PR in for git.install, I ran the command, from the project root:

./update-all -name git.install

This gave me an error as it tried to update a gist without credentials. No package was built.

I then went into the /automatic/git.install directory and ran the command:

./update.ps1

This error was thrown:

Get-GitHubRelease : The term 'Get-GitHubRelease' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At Z:\git\chocolatey\fork\chocolatey-coreteampackages\automatic\git.install\update.ps1:7 char:20
+   $releaseAssets = Get-GitHubRelease -Owner 'git-for-windows' -Name ' ...
+                    ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-GitHubRelease:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Expected Behaviour

When I try to update a package by manually running the scripts, it does not produce an error and creates a package.

Steps To Reproduce

See the Current Behaviour above.

Environment

- Operating System: Windows 11
- PowerShell Version: 5.1
- Shell: Windows Terminal

Anything else?

The issue was fixed in this commit.

If we expect people to be able to run the scripts as I did above, then we need to ensure they work and have everything they need to run inside them (for example, importing needed modules).

If we do not expect people to be able to runt he scripts, then we need to document:

  1. That the scripts are not designed to be run manually.
  2. What the process is for testing PR's.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions