-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add trunk-io/cli #13989
Comments
Thank you for opening the issue. I'm not familiar with this tool, so I'm checking it. 📝
It looks good. $ curl https://get.trunk.io -fsSL | bash
Welcome to Trunk!
This will download and install the latest Trunk Launcher. When you run 'trunk'
you'll really be running the Trunk Launcher, which figures out which version of
Trunk to run depending on which repo you're in and downloads it if needed. The
first time you use Trunk in a repo it will download the latest version.
This script will install
/usr/local/bin/trunk
Downloading and Installing
✔ Downloading Trunk Launcher... done
Installing Trunk Launcher (requires sudo access)...
✔ Installing Trunk Launcher... done
Next Steps
1. Initialize trunk in a repo
Run trunk init to setup trunk in a git repo
2. Read documentation
Our documentation can be found at https://docs.trunk.io
3. Get help and give feedback
Join the trunk community at https://slack.trunk.io $ trunk init
BusyBox v1.36.1 (2023-06-02 00:42:02 UTC) multi-call binary.
BusyBox v1.36.1 (2023-06-02 00:42:02 UTC) multi-call binary.
⡿ Downloading Trunk 1.12.3...
✔ Downloading Trunk 1.12.3... done
✔ Verifying Trunk sha256... done
✔ Unpacking Trunk... done
env: can't execute '/root/.cache/trunk/cli/1.12.3-linux-x86_64/trunk': No such file or directory
a7af56822531:/workspace/foo# echo $?
127 It seems the script downloads an asset and unarchive it into So maybe aqua can download assets from download_url directly.
if sort --help 2>&1 | grep BusyBox; then
readonly URL="https://trunk.io/releases/${dl_version}/trunk-${dl_version}-${PLATFORM}.tar.gz"
else
if [[ "$(printf "%s\n%s\n" "${TRUNK_NEW_URL_VERSION}" "${dl_version}" |
sort --version-sort |
head -n 1 || true)" == "${TRUNK_NEW_URL_VERSION}"* ]]; then
readonly URL="https://trunk.io/releases/${dl_version}/trunk-${dl_version}-${PLATFORM}.tar.gz"
else
readonly URL="https://trunk.io/releases/trunk-${dl_version}.${KERNEL}.tar.gz"
fi
fi
supported_envs:
- darwin
- amd64 |
This is still work in progress, but I could install trunk 1.12.3 by aqua. $ trunk --help
INFO[0000] download and unarchive the package aqua_version= env=darwin/arm64 exe_name=trunk package=trunk-io/cli package_name=trunk-io/cli package_version=1.12.3 program=aqua registry=standard
usage
trunk [flags] [subcommand]
flags
-h, --help usage information
--version the version
--monitor enable the trunk daemon to monitor file changes in your repo
--ci run in continuous integration mode
--no-progress don't show progress updates
--ci-progress rate limit progress updates to every 30s (implied by --ci)
--action_timeout timeout for downloads, lint runs, etc
-v, --verbose output details about what's happening under the hood
subcommands
init setup trunk in this repo
check universal code checker
fmt universal code formatter
merge submit a pull request to merge (https://app.trunk.io/merge)
login login to trunk.io
logout logout from trunk.io
upgrade upgrade trunk and its linters to the latest releases
plugins manage plugins
git-hooks manage git hooks
actions workflow automation for your repo
run run a specified trunk action
deinit deinit trunk from this repo
extended subcommands
whoami print who you're logged in as
config config management
cache cache management
daemon daemon management
install download & install enabled runtimes/linters
show-announcements show /trunk announcements
learn more
docs https://docs.trunk.io
help/feedback https://slack.trunk.io But I'm not sure if aqua really can support trunk yet. I'll take a look further. |
Hmm. Binary download isn't recommended. https://docs.trunk.io/docs/install#binary-download-not-recommended
|
Oh, I see. aqua can support trunk, but you need to manage the version of trunk in aqua.yaml and the version in |
@suzuki-shunsuke got it -- thanks for walking through your process. I feel like I could see two packages here:
Would you be open to a package that just did the wrapper install? I'd be happy to put that together if so. Thanks for the help on this! |
As for the option 1, the package name should be
This is the problem to install the wrapper by aqua. |
@suzuki-shunsuke how would you like to manage that version problem for the wrapper since it's not versioned? I really think there is value in installing it via aqua so aqua can be an all encompassing package / version manager solution, but I obviously get their is a purity to managing the version that this package would go against. What are you thoughts on that? |
aqua can't manage everything for now because aqua has some limitation. But I understand demands to manage everything by aqua. But at the same time we should be careful to extend aqua capability. Otherwise, aqua would get complicated and be difficult to maintain. Adding new features has always risks. As for unversioned tools, we have ever given up them. |
I created an issue about this. About aqua's features, it's better to discuss in aqua's Issues or Discussions so that everyone can find the discussion. |
👋 Hi from Trunk! Sorry I didn't see this thread sooner, but wanted to call out a few things that might make integration here easier. Option 1 as you've described is most in line with Trunk's own execution model, and it sounds like this approach mostly works within aqua.
As you correctly divined, our install URL https://get.trunk.io grabs a version of our launcher/wrapper, which is used to download and invoke our binary directly. Some Trunk functionality, including managing upgrades of linters and the binary itself is dependent on using this launcher to read the It sounds like the integration of the I'm not sure if this URL will be able to integrate well with renovate and your auto-upgrades, but hopefully it should unblock at least some of this. |
Hi @TylerJang27 , aqua supports getting the latest version and the list of versions of each package from GitHub Releases and tags. I searched the script in GitHub Organization https:/trunk-io with the phrase
So I thought this is the source of
This means the version of https:/trunk-io/breakpoint is different from the version of trunk launcher. Could you tell us how the source of trunk launcher and it's version is managed? |
The trunk launcher version is managed internally and is not provided through any GitHub Releases at the moment, however we do have this npm package version of it, which may also be useful. The breakpoint version is at 1.2.8 by coincidence. The latest launcher version is 1.2.7 (and is also always the value of With that being said, renovate is definitely something that's on our radar. We don't have work planned at the moment to add any renovate-specific integrations, but we may revisit this in the future for the sake of upgrading our |
I see. Thank you. Let me confirm just in case. trunk launcher should be installed into |
I created a pull request to install trunk launcher with aqua. |
Yep, the npm package will always be updated after the URL exists (so either the download URL or npm install should be sufficient). We also have a powershell launcher ( And yes, the trunk launcher should be installed into |
Sounds good. Thank you! I created a pull request to update trunk launcher with Renovate. It worked well. 👍 BTW, I'm just curious about how you found this issue. Did you guys talk about aqua somewhere? |
aqua-registry v4.81.0 and aqua-renovate-config 1.12.0 are out 🎉
You can install trunk launcher with aqua and update it with Renovate! |
Awesome! Thanks for moving on this so quickly! @Gowiem first brought aqua to our attention at Trunk, which I'll now be closing this issue :) |
Oh, I see. Thank you for your help! |
….0 (#131) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [aquaproj/aqua-renovate-config](https://togithub.com/aquaproj/aqua-renovate-config) | minor | `1.11.0` -> `1.12.0` | --- ### Release Notes <details> <summary>aquaproj/aqua-renovate-config (aquaproj/aqua-renovate-config)</summary> ### [`v1.12.0`](https://togithub.com/aquaproj/aqua-renovate-config/releases/tag/1.12.0) [Compare Source](https://togithub.com/aquaproj/aqua-renovate-config/compare/1.11.0...1.12.0) #### Features [#​444](https://togithub.com/aquaproj/aqua-renovate-config/issues/444) Support trunk-io/launcher - [https:/aquaproj/aqua-registry/issues/13989#issuecomment-1802998523](https://togithub.com/aquaproj/aqua-registry/issues/13989#issuecomment-1802998523) - [https:/aquaproj/aqua-registry/pull/17141](https://togithub.com/aquaproj/aqua-registry/pull/17141) - https:/aquaproj/aqua-registry/releases/tag/v4.81.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 4pm on thursday" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/scottames/dots). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40Ni4wIiwidXBkYXRlZEluVmVyIjoiMzcuNDYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Overview
I would like to add a package for trunk: https://docs.trunk.io/docs/overview
Suggested package name:
trunk-io/cli
I would be interested to do this work, but with the way the installation is done, I'm unsure what the best way to do so is.
Their install process is to run:
curl https://get.trunk.io -fsSL | bash
. Here is the script from that endpoint / installer:All
curl -fsSL https://trunk.io/releases/trunk
outputs is another, much larger bash file sadly.Are there any similar packages to this one that I could use as inspiration for this contribution?
References
The text was updated successfully, but these errors were encountered: