Skip to content

Commit 769ef09

Browse files
committed
update homebrew formula when updating master version
1 parent 97f2f99 commit 769ef09

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

codefresh-brew.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ version: '1.0'
22

33
steps:
44

5-
# fail_if_not_master:
6-
# title: "Validate running on master branch"
7-
# image: codefresh/cli-build
8-
# commands:
9-
# - 'echo This pipeline should be run only on master'
10-
# - 'exit 1'
11-
# when:
12-
# branch:
13-
# ignore: [ master ]
5+
fail_if_not_master:
6+
title: "Validate running on master branch"
7+
image: codefresh/cli-build
8+
commands:
9+
- 'echo This pipeline should be run only on master'
10+
- 'exit 1'
11+
when:
12+
branch:
13+
ignore: [ master ]
1414

1515
extract_version:
1616
title: "Exporting package.json version"

codefresh.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,16 @@ steps:
4646
when:
4747
branch:
4848
only: [ master ]
49+
50+
update_homebrew_formula:
51+
title: "Update Homebrew formula in case version was changed"
52+
image: codefresh/cli
53+
fail_fast: false
54+
commands:
55+
- 'apk update && apk add jq'
56+
- 'export PACKAGE_VERSION=$(jq -r ".version" package.json)'
57+
- "echo Current version: $PACKAGE_VERSION"
58+
- "git tag $PACKAGE_VERSION && echo Updating Homebrew formula && codefresh run 5a6f1c9804e70e0001b3acad -b=master --detach"
59+
when:
60+
branch:
61+
only: [ master ]

0 commit comments

Comments
 (0)