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

mise: Add Version 2025.1.6 #6374

Merged
merged 12 commits into from
Jan 13, 2025
Merged

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

@FilipDeVos FilipDeVos changed the title [email protected]: Add manifest [email protected]: Add manifest Dec 30, 2024
@FilipDeVos
Copy link
Contributor Author

/verify

Copy link
Contributor

All changes look good.

Wait for review from human collaborators.

mise

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

@FilipDeVos FilipDeVos changed the title [email protected]: Add manifest mise: Add Version 2024.12.22 Dec 30, 2024
@FilipDeVos
Copy link
Contributor Author

/verify

Copy link
Contributor

Your changes do not pass checks.

mise

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

@FilipDeVos
Copy link
Contributor Author

/verify

Copy link
Contributor

github-actions bot commented Jan 1, 2025

All changes look good.

Wait for review from human collaborators.

mise

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

@jdx
Copy link

jdx commented Jan 12, 2025

anything I can do to help with this? we've managed to get into winget and chocolatey, I'm sure scoop users would love to have mise too!

@chawyehsu chawyehsu changed the title mise: Add Version 2024.12.22 mise: Add Version 2025.1.6 Jan 13, 2025
@chawyehsu chawyehsu merged commit 05c81f8 into ScoopInstaller:master Jan 13, 2025
2 checks passed
@chawyehsu
Copy link
Member

Hello, I just reviewed and approved it.

@jdx Since you commented here, may I ask if it's good to support customizing the mise home directory via env var (sth like MISE_HOME), so we could relocate and persist the data with Scoop?

@jdx
Copy link

jdx commented Jan 13, 2025

I'm not sure I understand what "relocate and persist" would be for, no other package manager for mise does anything like that I don't think

@chawyehsu
Copy link
Member

For Scoop, portable mode is preferred when it's available, currently the data (shims/installs/downloads etc.) of mise are stored outside of the install.

Nevermind, I searched the mise codebase and found envs MISE_DATA_DIR that could be used to change the default location. I think it already satisfies.

@chawyehsu
Copy link
Member

Okay this is the diff, and if anyone wants to contribute they could open a new PR with it.

diff --git a/bucket/mise.json b/bucket/mise.json
index 531d459f7..5a9c32a66 100644
--- a/bucket/mise.json
+++ b/bucket/mise.json
@@ -15,25 +15,11 @@
     },
     "extract_dir": "mise",
     "bin": "bin/mise.exe",
-    "installer": {
-        "script": "Add-Path -Path \"$env:LOCALAPPDATA\\mise\\shims\" -Global:$global"
+    "env_set": {
+        "MISE_DATA_DIR": "$dir\\mise"
     },
-    "uninstaller": {
-        "script": "Remove-Path -Path \"$env:LOCALAPPDATA\\mise\\shims\" -Global:$global"
-    },
-    "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",
-        "        }",
-        "    }",
-        "}"
-    ],
+    "env_add_path": "mise\\shims",
+    "persist": "mise",
     "checkver": {
         "github": "https://github.com/jdx/mise"
     },

ev-dev added a commit to ev-dev/scoop-main that referenced this pull request Jan 13, 2025
…nal env vars

Included manifest changes suggested by @chawyehsu in PR ScoopInstaller#6374 which sets the internal mise configurable env var MISE_DATA_DIR to a directory that scoop persists
@ev-dev
Copy link
Contributor

ev-dev commented Jan 13, 2025

the changes @chawyehsu mentioned seem ideal, made a PR with the changes at #6453

@FilipDeVos FilipDeVos deleted the 6329-mise branch January 13, 2025 20:04
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
9 participants