Skip to content

Commit

Permalink
initial setup
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Cobbett <[email protected]>
  • Loading branch information
techcobweb committed Aug 15, 2024
1 parent cf0a6ee commit e9c3273
Show file tree
Hide file tree
Showing 11 changed files with 454 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: brew pr-pull

on:
pull_request_target:
types:
- labeled

jobs:
pr-pull:
if: contains(github.event.pull_request.labels.*.name, 'pr-pull')
runs-on: ubuntu-22.04
permissions:
contents: write
pull-requests: write
steps:
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Set up git
uses: Homebrew/actions/git-user-config@master

- name: Pull bottles
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }}
PULL_REQUEST: ${{ github.event.pull_request.number }}
run: brew pr-pull --debug --tap="$GITHUB_REPOSITORY" "$PULL_REQUEST"

- name: Push commits
uses: Homebrew/actions/git-try-push@master
with:
token: ${{ github.token }}
branch: main

- name: Delete branch
if: github.event.pull_request.head.repo.fork == false
env:
BRANCH: ${{ github.event.pull_request.head.ref }}
run: git push --delete origin "$BRANCH"
41 changes: 41 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: brew test-bot

on:
push:
branches:
- main
pull_request:

jobs:
test-bot:
strategy:
matrix:
os: [ubuntu-22.04, macos-13]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Cache Homebrew Bundler RubyGems
uses: actions/cache@v4
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-

- run: brew test-bot --only-cleanup-before

- run: brew test-bot --only-setup

- run: brew test-bot --only-tap-syntax

- run: brew test-bot --only-formulae
if: github.event_name == 'pull_request'

- name: Upload bottles as artifact
if: always() && github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: bottles_${{ matrix.os }}
path: '*.bottle.*'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
temp/
22 changes: 22 additions & 0 deletions Casks/g/galasactl.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

cask "galasactl" do

Check failure on line 2 in Casks/g/galasactl.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Layout/LeadingEmptyLines: Unnecessary blank line at the beginning of the source.
arch arm: "arm64", intel: "x86-64"

Check failure on line 4 in Casks/g/galasactl.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Cask/StanzaGrouping: stanza groups should be separated by a single empty line

Check failure on line 4 in Casks/g/galasactl.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Layout/TrailingWhitespace: Trailing whitespace detected.
version "0.36.0"
# Create the sha256 using shasum --algorithm 256 <file>
sha256 arm: "d162571e1fa71d78f0d625d4feb6d17da21da54b5888f6fedc52902330accf98",
intel: "a1ad08b22a1ca6f8f0755e34aec2a4b69ffee19450966753ba9a9f938c481653"

url "https://github.com/galasa-dev/cli/releases/download/v#{version}/galasactl-darwin-#{arch}",
verified: "github.com/galasa-dev/cli/releases/"
name "Galasa Client"
desc "Client to interact with the Galasa ecosystem or local development environment. Latest version."

Check failure on line 13 in Casks/g/galasactl.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Cask/Desc: Description is too long. It should be less than 80 characters. The current length is 94.

Check failure on line 13 in Casks/g/galasactl.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Cask/Desc: Description shouldn't end with a full stop.
homepage "https://galasa.dev/"

livecheck do
url :url
strategy :github_latest
end

binary "galasactl-darwin-#{arch}", target: "galasactl"
end
21 changes: 21 additions & 0 deletions Casks/g/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cask "[email protected]" do
arch arm: "arm64", intel: "x86-64"

Check failure on line 3 in Casks/g/[email protected]

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Cask/StanzaGrouping: stanza groups should be separated by a single empty line

Check failure on line 3 in Casks/g/[email protected]

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Layout/TrailingWhitespace: Trailing whitespace detected.
version "0.33.0"
# Create the sha256 using shasum --algorithm 256 <file>
sha256 arm: "2965195ff7da084a3b60e48547f6ffc26bada6ae7bfebcf3c804041cd829f8cc",
intel: "c60ab567dc246422507146460feb44f367e176bbfa69b33bdf232c56977f768e"

url "https://github.com/galasa-dev/cli/releases/download/v#{version}/galasactl-darwin-#{arch}",
verified: "github.com/galasa-dev/cli/releases/"
name "Galasa Client"
desc "Client to interact with the Galasa ecosystem or local development environment"
homepage "https://galasa.dev/"

livecheck do
url :url
strategy :github_latest
end

binary "galasactl-darwin-#{arch}", target: "galasactl"
end
21 changes: 21 additions & 0 deletions Casks/g/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cask "[email protected]" do
arch arm: "arm64", intel: "x86-64"

Check failure on line 3 in Casks/g/[email protected]

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Cask/StanzaGrouping: stanza groups should be separated by a single empty line

Check failure on line 3 in Casks/g/[email protected]

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Layout/TrailingWhitespace: Trailing whitespace detected.
version "0.34.0"
# Create the sha256 using shasum --algorithm 256 <file>
sha256 arm: "f6db24d394dcda85d0a6c93d24279f0e99a149c842fb2628b13c82409f794fd0",
intel: "47971b6d3427f4f3d9721ddcd98e6bfde73560d95df43f6a40837d6fd79f0f08"

url "https://github.com/galasa-dev/cli/releases/download/v#{version}/galasactl-darwin-#{arch}",
verified: "github.com/galasa-dev/cli/releases/"
name "Galasa Client"
desc "Client to interact with the Galasa ecosystem or local development environment"
homepage "https://galasa.dev/"

livecheck do
url :url
strategy :github_latest
end

binary "galasactl-darwin-#{arch}", target: "galasactl"
end
21 changes: 21 additions & 0 deletions Casks/g/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cask "[email protected]" do
arch arm: "arm64", intel: "x86-64"

Check failure on line 3 in Casks/g/[email protected]

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Cask/StanzaGrouping: stanza groups should be separated by a single empty line
version "0.34.1"
# Create the sha256 using shasum --algorithm 256 <file>
sha256 arm: "9336ff87dfe927a5fd07f5d59cffeb165680e4ce08ed199350810513b94ad85e",
intel: "f3be42f09c4b1dc0765c8c381bbb73f7095aa2d133bbd5916763ee025401ba17"

url "https://github.com/galasa-dev/cli/releases/download/v#{version}/galasactl-darwin-#{arch}",
verified: "github.com/galasa-dev/cli/releases/"
name "Galasa Client"
desc "Client to interact with the Galasa ecosystem or local development environment"
homepage "https://galasa.dev/"

livecheck do
url :url
strategy :github_latest
end

binary "galasactl-darwin-#{arch}", target: "galasactl"
end
21 changes: 21 additions & 0 deletions Casks/g/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cask "[email protected]" do
arch arm: "arm64", intel: "x86-64"

version "0.35.0"
# Create the sha256 using shasum --algorithm 256 <file>
sha256 arm: "8bf6aa19fd5ea6e34c40379165892272c67f74c6b11992a9f1840cc72e79e08c",
intel: "fc0f31701c06e1cfda03ed9c3303776a214cbab3d0d863a3ee4eaf6d5d40c0ff"

url "https://github.com/galasa-dev/cli/releases/download/v#{version}/galasactl-darwin-#{arch}",
verified: "github.com/galasa-dev/cli/releases/"
name "Galasa Client"
desc "Client to interact with the Galasa ecosystem or local development environment"
homepage "https://galasa.dev/"

livecheck do
url :url
strategy :github_latest
end

binary "galasactl-darwin-#{arch}", target: "galasactl"
end
21 changes: 21 additions & 0 deletions Casks/g/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cask "[email protected]" do
arch arm: "arm64", intel: "x86-64"

version "0.36.0"
# Create the sha256 using shasum --algorithm 256 <file>
sha256 arm: "d162571e1fa71d78f0d625d4feb6d17da21da54b5888f6fedc52902330accf98",
intel: "a1ad08b22a1ca6f8f0755e34aec2a4b69ffee19450966753ba9a9f938c481653"

url "https://github.com/galasa-dev/cli/releases/download/v#{version}/galasactl-darwin-#{arch}",
verified: "github.com/galasa-dev/cli/releases/"
name "Galasa Client"
desc "Client to interact with the Galasa ecosystem or local development environment. Version 0.36.0."
homepage "https://galasa.dev/"

livecheck do
url :url
strategy :github_latest
end

binary "galasactl-darwin-#{arch}", target: "galasactl"
end
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Galasa Tap

## How do I install these casks?

`brew install galasa-dev/tap/<cask>`

Or `brew tap galasa-dev/tap` and then `brew install <cask>`.

## Casks
Currently different version of casks for the Galasa Command-Line interface (galasactl). To install the latest version use the following command

```
brew install --no-quarantine galasactl
```

for a specific version use

```
brew install --no-quarantine [email protected]
```
for example
```
brew install --no-quarantine [email protected]
```

At the moment the --no-quarantine is required because otherwise its not possible to run the galasactl. See documentation about this at
https://galasa.dev.

## For maintainers: Releaseing a new version
Use the helper script `add-version.sh`

For example:
```bash
./add-version.sh --version 0.36.0
```

The file Cask/g/galasactl.rb will be updated with that version, so people can get that as the latest version.
An extra formula will be added for that version specifically also.
Loading

0 comments on commit e9c3273

Please sign in to comment.