Skip to content

Commit 3bc9bcc

Browse files
Add optional version parameter to linear/sync command (#2)
Add optional version parameter to linear/sync command
1 parent 765ef84 commit 3bc9bcc

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

.circleci/test-deploy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ jobs:
2525
- image: cimg/base:current
2626
steps:
2727
- checkout
28-
- linear/sync
28+
- linear/sync:
29+
version: "<< pipeline.id >>"
2930

3031
workflows:
3132
test-deploy:

src/commands/sync.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
description: Sync the current deployment to a Linear release pipeline
22

3+
parameters:
4+
version:
5+
description: Unique version identifier for this release (e.g. git tag, pipeline ID, semantic version)
6+
type: string
7+
default: ""
8+
39
steps:
410
- run:
511
name: Install linear-release
612
command: <<include(scripts/install-linear.sh)>>
713
- run:
814
name: Linear Release Sync
9-
command: ./linear-release sync
15+
environment:
16+
VERSION: << parameters.version >>
17+
command: <<include(scripts/sync.sh)>>

src/scripts/sync.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
if [ -n "${VERSION}" ]; then
3+
./linear-release sync --version "${VERSION}"
4+
else
5+
./linear-release sync
6+
fi

0 commit comments

Comments
 (0)