mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
refactor for getting latest squid-js github release
This commit is contained in:
parent
1b83d24725
commit
57940dc712
@ -86,7 +86,7 @@ exports.createPages = ({ graphql, actions }) => {
|
|||||||
) {
|
) {
|
||||||
name
|
name
|
||||||
releases(
|
releases(
|
||||||
first: 1
|
first: 30
|
||||||
orderBy: {
|
orderBy: {
|
||||||
field: CREATED_AT
|
field: CREATED_AT
|
||||||
direction: DESC
|
direction: DESC
|
||||||
@ -94,6 +94,8 @@ exports.createPages = ({ graphql, actions }) => {
|
|||||||
) {
|
) {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
|
isPrerelease
|
||||||
|
isDraft
|
||||||
releaseAssets(
|
releaseAssets(
|
||||||
first: 1
|
first: 1
|
||||||
name: "squid-js.json"
|
name: "squid-js.json"
|
||||||
@ -165,11 +167,13 @@ exports.createPages = ({ graphql, actions }) => {
|
|||||||
await createSwaggerPages(createPage)
|
await createSwaggerPages(createPage)
|
||||||
|
|
||||||
// API: squid-js
|
// API: squid-js
|
||||||
|
const lastRelease = result.data.squidJs.repository.releases.edges.filter(
|
||||||
|
({ node }) => !node.isPrerelease && !node.isDraft
|
||||||
|
)[0].node.releaseAssets.edges[0].node
|
||||||
await createTypeDocPage(
|
await createTypeDocPage(
|
||||||
createPage,
|
createPage,
|
||||||
result.data.squidJs.repository.name,
|
result.data.squidJs.repository.name,
|
||||||
result.data.squidJs.repository.releases.edges[0].node
|
lastRelease.downloadUrl
|
||||||
.releaseAssets.edges[0].node.downloadUrl
|
|
||||||
)
|
)
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user