From 805f3705882e8bc99af72826f1297988817f52ef Mon Sep 17 00:00:00 2001 From: Giacomo Citi Date: Thu, 26 Sep 2024 17:47:44 +0200 Subject: [PATCH] renaming and optional variable --- cli/lib/commands/publish.ts | 1 - cli/lib/{replace.ts => replaceShapesVersion.ts} | 2 +- cli/pipelines/publish.ttl | 7 ++++++- 3 files changed, 7 insertions(+), 3 deletions(-) rename cli/lib/{replace.ts => replaceShapesVersion.ts} (88%) diff --git a/cli/lib/commands/publish.ts b/cli/lib/commands/publish.ts index ee6cb5ff5..b1fb6cba6 100644 --- a/cli/lib/commands/publish.ts +++ b/cli/lib/commands/publish.ts @@ -42,7 +42,6 @@ export default runner.create({ variable.set('publish-graph-store-password', publishStore?.password || process.env.PUBLISH_GRAPH_STORE_PASSWORD) variable.set('metadata', $rdf.dataset()) variable.set('shapesPath', path.resolve(__dirname, `../../${profile}.ttl`)) - variable.set('shapesVersion', 'v0.2.2') if (cubeCreatorVersion) { variable.set('cubeCreatorVersion', cubeCreatorVersion) diff --git a/cli/lib/replace.ts b/cli/lib/replaceShapesVersion.ts similarity index 88% rename from cli/lib/replace.ts rename to cli/lib/replaceShapesVersion.ts index 845754790..0c35b34d4 100644 --- a/cli/lib/replace.ts +++ b/cli/lib/replaceShapesVersion.ts @@ -1,7 +1,7 @@ import type { Quad } from '@rdfjs/types' import { Context } from 'barnard59-core' -export default function replace(this: Context, version: string) { +export default function replaceShapesVersion(this: Context, version = 'v0.2.2') { const prefix = 'https://cube.link/latest/' const replacement = `https://cube.link/${version}/` const { env } = this diff --git a/cli/pipelines/publish.ttl b/cli/pipelines/publish.ttl index 5f33072d4..82bcb39fe 100644 --- a/cli/pipelines/publish.ttl +++ b/cli/pipelines/publish.ttl @@ -21,6 +21,11 @@ :name "executionUrl" ; :required false ] ; + :variable + [ + :name "shapesVersion" ; + :required false + ] ; ] ; :steps [ @@ -112,7 +117,7 @@ code:implementedBy [ a code:EcmaScript ; - code:link + code:link ] ; code:arguments ( 'shapesVersion'^^:VariableName ) .