New multi platform external binary for YAML to /fromJSON conversions.
This commit is contained in:
parent
4b75042fab
commit
ad8e0f445f
25
src/MiniDocs/YQ.class.st
Normal file
25
src/MiniDocs/YQ.class.st
Normal file
@ -0,0 +1,25 @@
|
||||
Class {
|
||||
#name : #YQ,
|
||||
#superclass : #Object,
|
||||
#category : #MiniDocs
|
||||
}
|
||||
|
||||
{ #category : #accessing }
|
||||
YQ class >> binaryDownloadLinkFor: operativeSystem on: processor [
|
||||
| binaryName binaryDownloadData |
|
||||
binaryName := 'yq_', operativeSystem , '_', processor.
|
||||
binaryDownloadData := ((self lastReleaseData at: 'assets')
|
||||
select: [:each | (each at: 'name') beginsWith: binaryName ]) first.
|
||||
^ binaryDownloadData at: 'browser_download_url'
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
YQ class >> install [
|
||||
^ self lastReleaseData
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
YQ class >> lastReleaseData [
|
||||
^ (STONJSON
|
||||
fromString: 'https://api.github.com/repos/mikefarah/yq/releases' asUrl retrieveContents) first
|
||||
]
|
Loading…
Reference in New Issue
Block a user