Skip to content

Commit cd08fdf

Browse files
committed
combine pipelines; add install doc
1 parent dabc24c commit cd08fdf

File tree

5 files changed

+49
-40
lines changed

5 files changed

+49
-40
lines changed

codefresh-brew.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

codefresh-release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,21 @@ steps:
106106
- 'cd public && git add --all && git commit -m "Publish new documentation for version ${{PACKAGE_VERSION}}" && git push https://${{GITHUB_TOKEN}}@github.com/codefresh-io/cli.git'
107107
environment:
108108
- HUGO_VERSION=0.32.0
109+
110+
update_brew_formula:
111+
title: "Updating homebrew formula"
112+
image: codefresh/cli-build
113+
commands:
114+
- VERSION=v${{PACKAGE_VERSION}}
115+
- curl -L https://github.com/codefresh-io/cli/releases/download/$VERSION/codefresh-$VERSION-macos-x64.tar.gz > $VERSION.tar.gz
116+
- echo "compute SHA256 ..."
117+
- SHA256="$(shasum -a 256 ./$VERSION.tar.gz | awk '{print $1}')"
118+
- echo "generate file from template ..."
119+
- sed -e "s/{{ VERSION }}/$VERSION/g" -e "s/{{ SHA256 }}/$SHA256/g" ./brew/template.rb > codefresh.rb
120+
- echo "Updating file in GitHub"
121+
- |
122+
curl -v -i -X PUT -H 'Authorization: token '${{COMMIT_TOKEN}}'' -d "{ \
123+
\"message\": \"update formula version $VERSION\", \
124+
\"content\": \"$(openssl base64 -A -in codefresh.rb)\", \
125+
\"sha\": $(curl -X GET https://api.github.com/repos/codefresh-io/homebrew-cli/contents/Formula/codefresh.rb | jq .sha) \
126+
}" https://api.github.com/repos/codefresh-io/homebrew-cli/contents/Formula/codefresh.rb

docs/content/installation/homebrew.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
+++
2+
title = "HOMEBREW"
3+
description = "Homebrew install"
4+
date = "2018-01-30T12:00:00+02:00"
5+
weight = 20
6+
+++
7+
8+
Install Codefresh CLI on macOS with [Homebrew](https://brew.sh).
9+
10+
## Install
11+
12+
```sh
13+
# tap Codefresh homebrew repo
14+
brew tap codefresh-io/cli
15+
# install Codefresh CLI
16+
brew install codefresh
17+
```
18+
19+
## Update to the latest version
20+
21+
```sh
22+
brew upgrade codefresh
23+
```
24+
25+
## Uninstall
26+
27+
```sh
28+
brew uninstall codefresh
29+
```

docs/content/installation/npm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ date = "2017-04-24T18:36:24+02:00"
55
weight = 10
66
+++
77

8-
{{% alert theme="warning" %}}the CLI requires node version 8.0.0 or higer{{% /alert %}}
8+
{{% alert theme="warning" %}}the CLI requires node version 8.0.0 or higher{{% /alert %}}
99

1010
Codefresh's CLI is available for installation through NPM registry.
1111

docs/content/installation/yarn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ date = "2017-04-24T18:36:24+02:00"
55
weight = 20
66
+++
77

8-
{{% alert theme="warning" %}}the CLI requires node version 8.0.0 or higer{{% /alert %}}
8+
{{% alert theme="warning" %}}the CLI requires node version 8.0.0 or higher{{% /alert %}}
99

1010
Codefresh's CLI is available for installation using YARN.
1111

0 commit comments

Comments
 (0)