File tree Expand file tree Collapse file tree 6 files changed +74
-2
lines changed
docs/content/installation Expand file tree Collapse file tree 6 files changed +74
-2
lines changed Original file line number Diff line number Diff line change
1
+ class Codefresh < Formula
2
+ desc "Codefresh CLI provides a full and flexible interface to interact with Codefresh."
3
+ homepage "http://cli.codefresh.io"
4
+ url "https://github.com/codefresh-io/cli/releases/download/{{ VERSION }}/codefresh-{{ VERSION }}-macos-x64.tar.gz"
5
+ version "{{ VERSION }}"
6
+ sha256 "{{ SHA256 }}"
7
+
8
+ def install
9
+ bin . install "codefresh"
10
+ end
11
+
12
+ test do
13
+ system "#{ bin } /codefresh version"
14
+ end
15
+ end
Original file line number Diff line number Diff line change @@ -106,3 +106,21 @@ steps:
106
106
- ' 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'
107
107
environment :
108
108
- 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
Original file line number Diff line number Diff line change @@ -46,3 +46,13 @@ steps:
46
46
when :
47
47
branch :
48
48
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
+ - " echo Updating Homebrew formula && codefresh run 5a6f1c9804e70e0001b3acad -b=master --detach"
56
+ when :
57
+ branch :
58
+ only : [ master ]
Original file line number Diff line number Diff line change
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
+ ```
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ date = "2017-04-24T18:36:24+02:00"
5
5
weight = 10
6
6
+++
7
7
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 %}}
9
9
10
10
Codefresh's CLI is available for installation through NPM registry.
11
11
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ date = "2017-04-24T18:36:24+02:00"
5
5
weight = 20
6
6
+++
7
7
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 %}}
9
9
10
10
Codefresh's CLI is available for installation using YARN.
11
11
You can’t perform that action at this time.
0 commit comments