Skip to content

Add latest releases and a script to get the commit hashes. - #3

Open
daxgames wants to merge 28 commits into
mcgitty:mainfrom
daxgames:update-script
Open

Add latest releases and a script to get the commit hashes.#3
daxgames wants to merge 28 commits into
mcgitty:mainfrom
daxgames:update-script

Conversation

@daxgames

@daxgames daxgames commented Dec 7, 2025

Copy link
Copy Markdown

I have tested the added hashes and they result in a working pacman install with 2.52.0.1

I also have a install_pacman.sh script that works but it does not make sense to add it to this repo or if it does to you I can add a mcgitty version of it here also. We are considering adding pacman to Cmder as a default component.

See: cmderdev/cmder#3060

See usage in edited README.md

@mcgitty

mcgitty commented Dec 24, 2025

Copy link
Copy Markdown
Owner

Sorry for the delay. Let me have a look in the coming days. However, since this is for git-bash, it makes more sense to have an automated script in bash instead of Windows CMD.

@daxgames

daxgames commented Dec 24, 2025

Copy link
Copy Markdown
Author

The cmd script is just a shim for a powershell script that does all the work.

Honestly you could do the same and write a update.sh that is a shim for the powershell much quicker than rewriting the whole thing in a shell script.

@daxgames

daxgames commented Dec 25, 2025

Copy link
Copy Markdown
Author

Added an update.sh shim so the update.ps1 can be run from cmd.exe, powershell.exe, pwsh.exe or git bash.

I chose to write this in Powershell because doing it in bash required several external dependencies.

@mcgitty

mcgitty commented Jan 12, 2026

Copy link
Copy Markdown
Owner

I suggest testing your code more. In your update-script branch, this failed:
update.cmd -Version 2.51.2

I happened to test the following command in cygwin, and the prompt "Enter index of release to use (empty to abort):" was not displayed:
. update.sh -Version 2.51.0

@daxgames

Copy link
Copy Markdown
Author

I do not use Cygwin so I do not have it installed.

I would not expect:

. update.sh -Version 2.51.0

To display anything. Not sure I would ever have thought of testing it that way.

But

./update.sh -Version 2.51.0

Has been tested from git bash and works as expected.

1 similar comment
@daxgames

Copy link
Copy Markdown
Author

I do not use Cygwin so I do not have it installed.

I would not expect:

. update.sh -Version 2.51.0

To display anything. Not sure I would ever have thought of testing it that way.

But

./update.sh -Version 2.51.0

Has been tested from git bash and works as expected.

@daxgames

Copy link
Copy Markdown
Author

I will look at the other.

@daxgames

Copy link
Copy Markdown
Author

The problem is with the shim files and not the ps1 script, so I removed the shims.

@mcgitty

mcgitty commented Jan 13, 2026

Copy link
Copy Markdown
Owner

Do the following from command window cmd.exe:
powershell -ExecutionPolicy Bypass
.\update.ps1 -Version 2.51.2
The property 'Count' cannot be found on this object. Verify that the property exists.
At C:\Users\michael\git\daxgames-cad0a21\update.ps1:66 char:9
+ if ($candidates.Count -gt 1) {
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], PropertyNotFoundException
+ FullyQualifiedErrorId : PropertyNotFoundStrict

@daxgames

Copy link
Copy Markdown
Author

Thanks for pushing for a fix. I was busy on other things last time I looked at it and there indeed was a bug when only one candidate was returned.

I also:

  1. Added back the shims and tested them.
  2. Started menu numbering at 1 when multiple candidates are returned.

In my testing it works as expected now.

@daxgames

Copy link
Copy Markdown
Author

Never mind I think I see one more issue. Will let you know when it is right.

@daxgames

Copy link
Copy Markdown
Author

Should be fixed now. Please let me know.

@mcgitty

mcgitty commented Jan 18, 2026

Copy link
Copy Markdown
Owner

Thanks for the update. I have my minimal but concise style of wording, so I will likely change text when I do merge. However, my tests focus on: 1) select the commit ID the same way as the manual-way; 2) the script doesn't crash if matching versions do exist.

For focus 1), the easy way is to find an existing release in the version file and see if the script outputs the same commit ID. So far it is working for a few old versions I tried, but I will test more, including those not in the version file.

For focus 2), I still encounter crashes when it shouldn't. Here are some examples (always select 1):
update.cmd -Version 2.39
update.cmd -Version 2.45.2

Seeing errors from above cases, I want to suggest a change. Your script seems to print the most recent version first for multiple match. Please make the default selection 1. My intend for the version file is not to capture all possible releases, but only the highest revision of "n.mm.x.y" at the time. Also, the script is non-destructive, so idea of "Abort" is not necessary.

@daxgames

daxgames commented Jan 18, 2026

Copy link
Copy Markdown
Author

@mcgitty We have conflicting goals but I can accomadate and make it work both ways. I can add -latest switch that will alway output the hashes for what would be selection #1. I can make the menu default selection be #1.

My testing always uses a three part semantic version and I was using 2.39.0 where you were using 2.39, I can even make that work.

I did get different hashes than in the file for some of the 2.39.0 versions but I attributed it to the manual way being, manual and more prone to human error since every other case I tested returned the same result as in the file.

I never did anything with 2.45.2 but I will look.

@daxgames

daxgames commented Jan 18, 2026

Copy link
Copy Markdown
Author

@mcgitty I think this is as close to what we both are looking for. I renamed updates.* to get-versiontags.* to both match powershell naming standards and version-tags.txt name. All shims also renamed, refactored and tested.

  1. Default behavior is to always show latest and not show a menu unless -latest:$false is specified.
  2. -version [v]n.[n].[n] is now optional.
    • If omitted and -latest:$false is specified then a menu of ALL releases with valid package-version-*.txt files in build-extra is displayed.
  3. I also added -help arg and command line help.

Please lt me know if you see anything else.

@daxgames

daxgames commented Jan 18, 2026

Copy link
Copy Markdown
Author

There is now an -all command line option. See below:

PS C:\Users\vagrant\src\github\mcgitty\pacman-for-git> .\get-versiontags -all >x.txt   
Please wait, gathering data for all releases...
PS C:\Users\vagrant\src\github\mcgitty\pacman-for-git> bcomp .\x.txt .\version-tags.txt

x64:

{127CC6E9-1B08-4DAB-ABEA-4845427E93EA}

x86:

{F9F3BD59-BAFD-4B0E-B0EF-61ADE75729E8}

@daxgames

Copy link
Copy Markdown
Author

I think I am done.

@daxgames

Copy link
Copy Markdown
Author

Still not happy cleaning it up.

@daxgames

Copy link
Copy Markdown
Author

Now I'm done

@daxgames

Copy link
Copy Markdown
Author

The git team messed up the latest release by listing the wrong version in the package-versions.txt:

image

@daxgames

daxgames commented Feb 14, 2026

Copy link
Copy Markdown
Author

The latest version:

Get a single specific version:
image

Get the latest version:

image

Get all versions:

image

If a gh not avail or gh auth token does not return a token:

image

@daxgames

Copy link
Copy Markdown
Author

Added -y for auto approve using gh supplied token and -outfile switch:

image image

@daxgames

Copy link
Copy Markdown
Author

Now I am done.

@daxgames

daxgames commented Apr 22, 2026

Copy link
Copy Markdown
Author

Have you noticed the latest releases do not seem to have the same versioning in the package-versions-n.n.n.txt

{B0D946CC-5C44-4B42-8A2D-C3CA2B6D67E8}

Enther the version numbers do not match or missing the commit hash/buildinfo bits.

@daxgames

daxgames commented Apr 22, 2026

Copy link
Copy Markdown
Author

The script still works even though they seem to have changed the package-versions-n.n.n.txt versioning.

See: https://github.com/daxgames/pacman-for-git/blob/main/version-tags.txt

{D1E09CE6-950E-4B9F-82ED-938BD7562AFB}

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.

2 participants