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

Update install to support custom path #244

Merged
merged 1 commit into from
Mar 5, 2025
Merged

Conversation

lzap
Copy link
Contributor

@lzap lzap commented Mar 5, 2025

I want this tool to be in my $HOME/bin rather than /usr/local. Introduces a second argument that is the installation destination. Also allows you to pass latest as the first one:

install latest $HOME

Otherwise one would need to find the latest version manually which I do not like.

Also avoid using mkdir since install allows you to specify permissions ignoring umask completely. This is somewhat unrealated, is is my own thing as I am Fedora packager and it is just cought my eye :-)

Awesome tool, going to try it now. Cheers!

Signed-off-by: Lukáš Zapletal <lukas@zapletalovi.com>
Copy link
Member

@jviotti jviotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks a lot! I originally created the script only to power the GitHub Action, but glad to see you found it useful.

@jviotti jviotti merged commit 1b9a5df into sourcemeta:main Mar 5, 2025
7 checks passed
@lzap lzap deleted the patch-1 branch March 6, 2025 06:56
@boesing
Copy link

boesing commented Mar 6, 2025

Having this merged to main leads to ongoing issues with this GHA.
We are using ubuntu-latest runner and when the file is being downloaded, it always ends up in an error:

Run sourcemeta/jsonschema@v7.0.0
Run curl --retry 5 --location --fail-early --silent --show-error \
---- Fetching the pre-built JSON Schema CLI binary from GitHub Releases
---- Fetching version v7.0.0 from https://github.com/sourcemeta/jsonschema/releases/download/v7.0.0/jsonschema-7.0.0-linux-x86_6[4](https://github.com/vendor/project/actions/runs/13693742348/job/38291525513?pr=223#step:4:5).zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 [15](https://github.com/vendor/project/actions/runs/13693742348/job/38291525513?pr=223#step:4:17)04k  100 1504k    0     0  2696k      0 --:--:-- --:--:-- --:--:-- 2696k
Archive:  /tmp/tmp.dK1YejU4Q5/artifact.zip
   creating: /tmp/tmp.dK1YejU4Q5/out/jsonschema-7.0.0-linux-x86_64/bin/
  inflating: /tmp/tmp.dK1YejU4Q5/out/jsonschema-7.0.0-linux-x86_64/bin/jsonschema  
install: cannot change permissions of ‘/usr/local/bin’: Operation not permitted

I have no idea why this is already "live" since there has been no release but it starts failing in 7.0.0 even tho it used to work with 7.0.0 when we updated a few days ago.

Would be decent if you can have a look on that.
Thanks.

@jviotti
Copy link
Member

jviotti commented Mar 6, 2025

I'm just starting my day, but I think this is because of #249. There was a change on GitHub Actions runners that seemed unrelated to this PR (they changed default permissions for /usr/local). Can you confirm the fix in that issue works?

@jviotti
Copy link
Member

jviotti commented Mar 6, 2025

I'm working on releasing v7.0.1 with the fix now

@jviotti
Copy link
Member

jviotti commented Mar 6, 2025

@boesing Please try v7.0.1: https://github.com/sourcemeta/jsonschema/releases/tag/v7.0.1. That should accommodate to GitHub Actions new changes

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.

3 participants