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

[email protected]: Add manifest #6374

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

FilipDeVos
Copy link
Contributor

This pull request adds the manifest to install the "mise-en-place" tool from https://github.com/jdx/mise/

Closes #6329

  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

@FilipDeVos
Copy link
Contributor Author

/verify

Copy link
Contributor

github-actions bot commented Dec 9, 2024

All changes look good.

Wait for review from human collaborators.

mise

  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

1 similar comment
Copy link
Contributor

github-actions bot commented Dec 9, 2024

All changes look good.

Wait for review from human collaborators.

mise

  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

@FilipDeVos FilipDeVos changed the title mise: Add version 2024.12.3 [email protected]: Add initial version of manifest Dec 9, 2024
@FilipDeVos FilipDeVos changed the title [email protected]: Add initial version of manifest mise: Add version 2024.12.3 Dec 9, 2024
@FilipDeVos FilipDeVos changed the title mise: Add version 2024.12.3 [email protected]: Add manifest Dec 9, 2024
@FilipDeVos
Copy link
Contributor Author

I am trying to do the right thing with the PR title, but the documentation is contradicting.

  • For buckets it says: If it's a new manifest, use : Add version .
  • In the PR template it says: use conventional commits.

@o-l-a-v
Copy link
Contributor

o-l-a-v commented Dec 9, 2024

If we want mise to be purged if scoop uninstall --purge mise, which I guess we do, then add something like:

{
  "post_uninstall": [
        "if ($purge) {",
        "    $Directories = [string[]](",
        "        ('{0}\\mise' -f $env:LOCALAPPDATA),",
        "        ('{0}\\Temp\\mise' -f $env:LOCALAPPDATA)",
        "    )",
        "    $Directories.ForEach{",
        "        if (Test-Path -Path $_ -PathType 'Container') {",
        "            $null = Remove-Item -Path $_ -Recurse -Force",
        "        }",
        "    }",
        "}"
    ]
}

@nagromc
Copy link
Contributor

nagromc commented Dec 9, 2024

I was about to submit a PR; thanks @FilipDeVos!

I suggest two things:

  1. Use a more precise description. The About page is pretty good IMO:

    Development environment setup tool

  2. Use the full name as the app ID: i.e. mise-en-place.json instead of mise.json

@FilipDeVos
Copy link
Contributor Author

I noticed that we need to add $env:LOCALAPPDATA\mise\shims to $env:PATH

I'll research a bit what the best way of doing this is.

@o-l-a-v
Copy link
Contributor

o-l-a-v commented Dec 9, 2024

Scratch this idea

Maybe "post_install" to add it with PowerShell, and "post_uninstall" to remove it? In user context. Something like this (untested):

[System.Environment]::SetEnvironmentVariable(
   'Path',
   ('{0};{1}\mise\shims' -f [System.Environment]::GetEnvironmentVariable('Path','User'), $env:LOCALAPPDATA),
  'User'
)

Edit: Scratch the above, seems Scoop has env_add_path which can be used for this?

@FilipDeVos
Copy link
Contributor Author

env_add_path only supports folders under the installation folder I think.

@FilipDeVos
Copy link
Contributor Author

FilipDeVos commented Dec 9, 2024

I think this commit does the trick.

@FilipDeVos
Copy link
Contributor Author

/verify

Copy link
Contributor

github-actions bot commented Dec 9, 2024

Your changes do not pass checks.

mise-en-place

  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

@FilipDeVos
Copy link
Contributor Author

/verify

Copy link
Contributor

github-actions bot commented Dec 9, 2024

All changes look good.

Wait for review from human collaborators.

mise-en-place

  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

@jdx
Copy link

jdx commented Dec 10, 2024

@FilipDeVos thank you so much for doing this, I was literally starting to do it myself when I thought to check if maybe someone made a PR already.

It's great you added the shims, though in the future if we get powershell support for mise activate we'll need to probably rethink that. I still think it's good to auto-add shims now though.

I am also working on winget (though it's failing and idk why) and have created a github action to automatically bump it on releases. Do you think something similar for scoop would be good?

I know these are unrelated to scoop but we also have chocolatey which is community maintained, but I have noticed it has been quite out of date. I think if you or I did some of the legwork on automatically bumping in gha it would probably be good to try to knock out all 3.

@FilipDeVos
Copy link
Contributor Author

@jdx scoop auto-updates the version, that is what the checkver logic is for. So there is no need to make pipelines.

Once the PR is merged in main it will start bumping the version automatically.

I can take a look at the winget/chocolatey Manifests if you have a branch somewhere, but I'm not interested in being maintainer of that stuff.

@jdx
Copy link

jdx commented Dec 10, 2024

totally understand, if you wouldn't mind having a look at my winget PR to see if there is anything obviously wrong I would definitely appreciate it!

@chawyehsu
Copy link
Member

The name mise is available to occupied, it should be used as the manifest name to provide a max consistency if it's used on other pms.

@chawyehsu
Copy link
Member

I am trying to do the right thing with the PR title, but the documentation is contradicting.

  • For buckets it says: If it's a new manifest, use : Add version .
  • In the PR template it says: use conventional commits.

There's no contradicting, Add version could be the PR summary <general summary of the pull request>, [@version] is optional.

  • [email protected]: Add manifest good
  • mise: Add version 2024.12.3 also good
  • Add mise version 2024.12.3 bad
  • Add mise manifest worst

@gatspy
Copy link

gatspy commented Dec 19, 2024

No matches found.
scoop search mise # WARN No matches found.

@nagromc
Copy link
Contributor

nagromc commented Dec 20, 2024

No matches found. scoop search mise # WARN No matches found.

It has not been merged yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Request]: mise
6 participants