russellbanks / komac Goto Github PK
View Code? Open in Web Editor NEWThe Community Manifest Creator for WinGet
License: GNU General Public License v3.0
The Community Manifest Creator for WinGet
License: GNU General Public License v3.0
https://docs.github.com/en/rest/git/commits?apiVersion=2022-11-28#create-a-commit
The GitHub REST API allows setting custom commit names and emails. GitHub Codespaces use $GIT_COMMITTER_NAME
and $GIT_COMMITTER_EMAIL
environment variables.
So, if both of the above variables are set in the environment, we can add their value to the REST API request, else, use omit them so that the API will use the default name & email associated with the GitHub token supplied.
Hi,
with the latest vim.vim releases, it fails with the mentioned error message: "The number of unique installer urls is greater than the number of previous manifest urls"
Don't know what this means :/
https://github.com/vim/vim-win32-installer/actions/runs/5339923565/jobs/9679145176
I am not sure if this is related, but apparently the latest released winget-packages version used the same installer for x86 as well as x64 which looks wrong. https://github.com/microsoft/winget-pkgs/blob/master/manifests/v/vim/vim/9.0.1632/vim.vim.installer.yaml
I installed Komac using WinGet:
winget install komac
However, it wasn't added to PATH. I must navigate to
C:\Users\<username>\AppData\Local\Komac\
in order to run it.
Is this the expected behaviour of the installer?
Yep I've actually already got it installed and I used it recently to update the Google.Chrome manifest. I did notice that it didn't keep the scope values when updating so I had to do that by hand. I was actually planning on making an issue or letting Russell know directly but I've been busy with a new job lol
Reported by @warshanks to me in personal chat
There are a couple specific cases where komac generates invalid manifests when updating currently:
https://github.com/ArmCord/ArmCord/actions/runs/4972653487/jobs/8897984711
Executing command: java -jar komac.jar update --id 'ArmCord.ArmCord' --version 3.2.0 --urls 'https://github.com/ArmCord/ArmCord/releases/download/v3.2.0/ArmCord.Setup.3.2.0.ARM64.exe,https://github.com/ArmCord/ArmCord/releases/download/v3.2.0/ArmCord.Setup.3.2.0.exe' --submit
CI environment detected! Komac will throw errors instead of prompting on invalid input
Found ArmCord.ArmCord in the winget-pkgs repository
Found latest version: 3.1.7
# Created with WinGet Releaser v2 using Komac v1.6.0
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.4.0.schema.json
PackageIdentifier: ArmCord.ArmCord
PackageVersion: 3.2.0
InstallerType: nullsoft
Scope: user
UpgradeBehavior: install
ReleaseDate: 2023-05-[14](https://github.com/ArmCord/ArmCord/actions/runs/4972653487/jobs/8897984711#step:2:15)
Installers:
- Architecture: x64
InstallerUrl: https://github.com/ArmCord/ArmCord/releases/download/v3.2.0/ArmCord.Setup.3.2.0.ARM64.exe
InstallerSha256: 8AB84F27C7284E0FC55E549CED81DD9B8AE2EB9FD[20](https://github.com/ArmCord/ArmCord/actions/runs/4972653487/jobs/8897984711#step:2:21)4DC44614835929C7DE9DE
- Architecture: arm64
InstallerUrl: https://github.com/ArmCord/ArmCord/releases/download/v3.2.0/ArmCord.Setup.3.2.0.ARM64.exe
InstallerSha[25](https://github.com/ArmCord/ArmCord/actions/runs/4972653487/jobs/8897984711#step:2:26)6: 8AB84F[27](https://github.com/ArmCord/ArmCord/actions/runs/4972653487/jobs/8897984711#step:2:28)C7[28](https://github.com/ArmCord/ArmCord/actions/runs/4972653487/jobs/8897984711#step:2:29)4E0FC55E549CED81DD9B8AE2EB9FD204DC446148359[29](https://github.com/ArmCord/ArmCord/actions/runs/4972653487/jobs/8897984711#step:2:30)C7DE9DE
ManifestType: installer
ManifestVersion: 1.4.0
The second URL doesn't get used, and the arm64 link was incorrectly provided in the x64 arch.
Recording 2023-05-21 114924.webm
This can be worked around by filling all optional fields up to this point and then just saving the manifest locally to manually delete anything unnecessary. I've had this happen with packages of any InstallerType, so I think the cause is that there is a required field that is not labeled as required.
Additionally the scope and upgradebehavior dialogues do not have the [Confirm] button to skip them.
Here's a checklist:
https://github.com/coreybutler/nvm-windows/actions/runs/4685243965/jobs/8313882263#step:2:94
Found forked winget-pkgs repository: coreybutler/winget-pkgs
Failed to create pull request
node:internal/errors:841
const err = new Error(message);
^
Error: Command failed: & $env:JAVA_HOME_17_X64\bin\java.exe -jar komac.jar update --id 'CoreyButler.NVMforWindows' --version 1.1.11 --urls 'https://github.com/coreybutler/nvm-windows/releases/download/1.1.11/nvm-setup.exe' --submit
at checkExecSyncError (node:child_process:828:11)
at execSync (node:child_process:899:15)
at D:\a\_actions\vedantmgoyal2009\winget-releaser\v2\dist\index.js:77:39
at processTicksAndRejections (node:internal/process/task_queues:[96](https://github.com/coreybutler/nvm-windows/actions/runs/4685243965/jobs/8313882263#step:2:97):5) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 2592,
stdout: null,
stderr: null
}
Use CI
environment variable to detect whether Komac is running in an interactive environment or an unattended environment like GitHub Actions, etc... We should throw an error when running unattended or else re-prompt when an incorrect value is entered.
Don't require --submit
parameter when Komac is running when CI
environment variable is true.
Currently, we can only add/change tokens. There should also be komac token <clear|delete>
command to erase token stored on computer, because one might want to due to security reasons.
Ability to install Komac for all users (Program Files).
See https://github.com/twpayne/chezmoi/actions/runs/4204060275/jobs/7294228081#step:2:13:
Exception in thread "Timer-0" java.lang.IllegalArgumentException: length must be 2 or greater, was 1
at com.github.ajalt.colormath.transform.InterpolateKt.sequence(Interpolate.kt:158)
at com.github.ajalt.mordant.widgets.ProgressBar.makeComplete(ProgressBar.kt:107)
at com.github.ajalt.mordant.widgets.ProgressBar.render(ProgressBar.kt:86)
at com.github.ajalt.mordant.widgets.Padded.render(Padding.kt:99)
at com.github.ajalt.mordant.table.TableRenderer.<init>(Table.kt:246)
at com.github.ajalt.mordant.table.TableImpl.render(Table.kt:121)
at com.github.ajalt.mordant.rendering.Widget$DefaultImpls.render$default(Widget.kt:7)
at com.github.ajalt.mordant.animation.Animation.update(Animation.kt:76)
at com.github.ajalt.mordant.animation.ProgressAnimation.tick(ProgressAnimation.kt:164)
at com.github.ajalt.mordant.animation.ProgressAnimation.access$tick(ProgressAnimation.kt:91)
at com.github.ajalt.mordant.animation.ProgressAnimation$start$1.invoke(ProgressAnimation.kt:154)
at com.github.ajalt.mordant.animation.ProgressAnimation$start$1.invoke(ProgressAnimation.kt:153)
at com.github.ajalt.mordant.animation.JvmTicker$start$$inlined$timer$default$1.run(Timer.kt:[14](https://github.com/twpayne/chezmoi/actions/runs/4204060275/jobs/7294228081#step:2:15)9)
at java.base/java.util.TimerThread.mainLoop(Timer.java:566)
at java.base/java.util.TimerThread.run(Timer.java:516)
Exception in thread "Timer-2" java.lang.IllegalArgumentException: length must be 2 or greater, was 1
at com.github.ajalt.colormath.transform.InterpolateKt.sequence(Interpolate.kt:[15](https://github.com/twpayne/chezmoi/actions/runs/4204060275/jobs/7294228081#step:2:16)8)
at com.github.ajalt.mordant.widgets.ProgressBar.makeComplete(ProgressBar.kt:107)
at com.github.ajalt.mordant.widgets.ProgressBar.render(ProgressBar.kt:86)
at com.github.ajalt.mordant.widgets.Padded.render(Padding.kt:99)
at com.github.ajalt.mordant.table.TableRenderer.<init>(Table.kt:246)
at com.github.ajalt.mordant.table.TableImpl.render(Table.kt:121)
at com.github.ajalt.mordant.rendering.Widget$DefaultImpls.render$default(Widget.kt:7)
at com.github.ajalt.mordant.animation.Animation.update(Animation.kt:76)
at com.github.ajalt.mordant.animation.ProgressAnimation.tick(ProgressAnimation.kt:[16](https://github.com/twpayne/chezmoi/actions/runs/4204060275/jobs/7294228081#step:2:17)4)
at com.github.ajalt.mordant.animation.ProgressAnimation.access$tick(ProgressAnimation.kt:91)
at com.github.ajalt.mordant.animation.ProgressAnimation$start$1.invoke(ProgressAnimation.kt:154)
at com.github.ajalt.mordant.animation.ProgressAnimation$start$1.invoke(ProgressAnimation.kt:153)
at com.github.ajalt.mordant.animation.JvmTicker$start$$inlined$timer$default$1.run(Timer.kt:149)
at java.base/java.util.TimerThread.mainLoop(Timer.java:566)
at java.base/java.util.TimerThread.run(Timer.java:516)
It worked normally afterwards, though. But this might be important, so I'm making an issue here. Related to #87 perhaps (same package)?
It should prompt you to enter InstallerUrl again if running interactively which is the case here.
Add --token
or -t
flag to directly update token to Komac without requiring user input.
Trying to run it after install starts the rosetta install prompt, where it can already be run natively with just the jar.
Hide PAT field input using a mask character (*
) or completely hide the input.
Whenever I try to run new
or update
commands, token validity checks obstruct the package identifier prompt, which is bad in terms of UX.
Instead, of checking in the background, we can display some kind of animation like a loading circle, and after validation checks are complete, we can ask for a package identifier, or token if the current token is invalid.
When I was using tools like Fastgithub to speed github, Following information has appeard.
It should be an issue with the tool using a self-signed certificate, could you add an option to ignore certificate validation to fix this?
Support getting token stored in environment variables, so that Komac can be used in CI/CD pipelines, like GitHub Actions.
Related issues:
See flyctl. Normally, duplicate RelativeFilePath
s don't get validated successfully, but has a workaround, allowing for multiple aliases in a single executable. In Komac, it seems like I can only add 1 alias per executable. Please add support for this use case, thanks!
See vedantmgoyal9/winget-releaser#82 (comment). Komac does not ask for a prompt for RelativeFilePath
when updating yet.
Support for 1.4 manifests. Also, updating the
RelativeFilePath
should be supported in cases where the executable is inside a versioned directory. For example:- RelativeFilePath: bat-v0.22.1-x86_64-pc-windows-msvc\bat.exe
microsoft/winget-pkgs#101118 (comment)
Both archs are using x32
url
There are some packages where a developer has recently ceased supporting x86 or added arm64. Others have portable packages that are now supported by winget. Currently a manifest has to manually be updated when either case occurs, but it would be more convenient to do this within komac.
Here's a checklist:
The product code is incorrect, and the InstallerType
is also replaced from wix
to msi
. Here is the correct entry, as shown in Windows. It even has some additional entries:
WingetCreate has this feature. For most people, the OAuth flow is a more convenient option.
When running Komac update
, Komac should show a link to the pull request at the end of the command:
However, this is no longer showing in the latest version. Example with https://github.com/LGUG2Z/whkd/actions/runs/4411818940/jobs/7730689700:
Despite that, the PR is successfully created: microsoft/winget-pkgs#99400
Tried to run this command:
Komac update --id Microsoft.OpenSSH.Beta --version 9.2.2.0 --urls https://github.com/PowerShell/Win32-OpenSSH/releases/download/v9.2.2.0p1-Beta/OpenSSH-ARM64-v9.2.2.0.msi,https://github.com/PowerShell/Win32-OpenSSH/releases/download/v9.2.2.0p1-Beta/OpenSSH-Win32-v9.2.2.0.msi,https://github.com/PowerShell/Win32-OpenSSH/releases/download/v9.2.2.0p1-Beta/OpenSSH-Win64-v9.2.2.0.msi
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
Cargo.toml
base16ct 0.2.0
base64ct 1.6.0
bitflags 2.5.0
camino 1.1.6
chrono 0.4.38
clap 4.5.4
color-eyre 0.6.3
const_format 0.2.32
crossterm 0.27.0
cynic 3.7.0
derive_more 0.99.17
futures 0.3.30
futures-util 0.3.30
heapless 0.8.0
indexmap 2.2.6
indicatif 0.17.8
inquire 0.7.5
itertools 0.12.1
keyring 2.3.3
memmap2 0.9.4
msi 0.7.0
num-traits 0.2.19
num_cpus 1.16.0
nutype 0.4.2
object 0.35.0
open 5.1.2
ordinal 0.3.2
oxilangtag 0.1.5
package-family-name 1.1.0
percent-encoding 2.3.1
pulldown-cmark 0.10.3
quick-xml 0.31.0
rand 0.8.5
reqwest 0.12.4
serde 1.0.200
serde_json 1.0.116
serde_with 3.8.1
serde_yaml 0.9.34
sha2 0.10.8
strum 0.26.2
tempfile 3.10.1
thiserror 1.0.59
tokio 1.37.0
url 2.5.0
uuid 1.8.0
versions 6.2.0
zip 1.1.4
indoc 2.0.5
rstest 0.19.0
sha1 0.10.6
cynic-codegen 3.7.0
windows_exe_info 0.4.2
.github/workflows/build.yml
actions/checkout v4
moonrepo/setup-rust v1
.github/workflows/release.yml
actions/checkout v4
moonrepo/setup-rust v1
softprops/action-gh-release v2
vedantmgoyal2009/winget-releaser v2
crazy-max/ghaction-virustotal v4
actions/checkout v4
moonrepo/setup-rust v1
.github/workflows/update-graphql-schema.yml
actions/checkout v4
peter-evans/create-pull-request v6
.github/workflows/update-inno-dependencies.yml
actions/checkout v4
peter-evans/create-pull-request v6
When choosing a directory to write the manifest to, add a prompt to create the directory if it doesn't exist.
When we use the version in release artifacts, it becomes difficult to download Komac in automated scenarios by using URLs like https://github.com/russellbanks/Komac/releases/download/latest/Komac-0.9.0.exe
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.