-
Notifications
You must be signed in to change notification settings - Fork 63
Snap packaging for jd #81
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: jd | ||
| base: core24 | ||
| adopt-info: jd | ||
| summary: Utility to diff and patch json and yaml files | ||
| description: | | ||
| jd is a commandline utility and Go library for diffing and patching JSON | ||
| and YAML values. It supports a native jd format (similar to unified format) | ||
| as well as JSON Merge Patch (RFC 7386) and a subset of JSON Patch (RFC 6902). | ||
| Try it out at http://play.jd-tool.io/. | ||
|
|
||
| grade: stable # must be 'stable' to release into candidate/stable channels | ||
| confinement: strict # use 'strict' once you have the right plugs and slots | ||
Hook25 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
Hook25 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| apps: | ||
| jd: | ||
| command: jd | ||
| plugs: &standard [home, network-bind] | ||
Hook25 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| parts: | ||
| jd: | ||
| plugin: dump | ||
| build-snaps: | ||
| - go | ||
| source: . | ||
| override-build: | | ||
| craftctl default | ||
| export GOROOT="$(go env GOROOT)" | ||
| make build | ||
| ls | ||
| mv release/jd $CRAFT_PART_INSTALL/ | ||
| # extract the version from main.go and set it as the snap version | ||
| VERSION=`grep "const version" main.go | grep -oP '"[\w\.-]+"' | grep -oP "[\w\.-]+"` | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be more stable to rely on the
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello, sorry I kinda abandoned this here. The point of that line is to extract an actual version from jd (as it doesn't seem to return the semver version from the
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code at HEAD doesn't have a version (it just returns |
||
| craftctl set version=${VERSION:-unknown} | ||
| stage: | ||
| - jd | ||
Hook25 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Uh oh!
There was an error while loading. Please reload this page.