diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 34da9c3..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,38 +0,0 @@ -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" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 5008026..0000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: brew test-bot - -on: - push: - branches: - - main - pull_request: - -jobs: - test-bot: - strategy: - matrix: - os: [ubuntu-22.04, macos-13, macos-15] - 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: ${{ matrix.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }} - restore-keys: ${{ matrix.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.*' diff --git a/Formula/bump-version.rb b/Formula/bump-version.rb new file mode 100644 index 0000000..8049362 --- /dev/null +++ b/Formula/bump-version.rb @@ -0,0 +1,21 @@ +class BumpVersion < Formula + desc "Command-line tool for managing versions of a swift command-line application." + homepage "https://git.housh.dev/michael/bump-version.git" + url "https://git.housh.dev/michael/bump-version/archive/0.2.0.tar.gz" + sha256 "fixme" + license "MIT" + version "0.2.0" + + depends_on xcode: ["16.0", :build] + uses_from_macos "swift" => :build + + def install + system "swift", "build", "--disable-sandbox", "--configuration", "release", "--product" "bump-version" + bin.install ".build/release/bump-version" + generate_completions_from_executable(bin/"bump-version", "--generate-completion-script") + end + + test do + system "#{bin}/bump-version", "--version" + end +end diff --git a/Formula/hpa.rb b/Formula/hpa.rb index 9f65d0c..c9f84d4 100644 --- a/Formula/hpa.rb +++ b/Formula/hpa.rb @@ -1,32 +1,32 @@ class Hpa < Formula - desc "Command-line tool for managine home assesment projects" + desc "Command-line tool for managing home assesment projects" homepage "https://git.housh.dev/michael/swift-hpa.git" - url "https://git.housh.dev/michael/swift-hpa/archive/v0.1.1.tar.gz" - sha256 "e6424672802fae056e423f3af77fda5a9c9bb5307ac2712ff8bfd072c1642a3b" + url "https://git.housh.dev/michael/swift-hpa/archive/v0.1.5.tar.gz" + sha256 "806402e82f9dedd52d50fc7c78bc725418766702512df6b08fa77c3f5d041011" license "MIT" + version "0.1.5" bottle do - root_url "https://git.housh.dev/michael/swift-hpa/releases/download/v0.1.1" - rebuild 1 - sha256 cellar: :any_skip_relocation, arm64_sequoia: "b93acab399346d8babcebfb85a6e2b8081715737caa926c5a0e53335e987e24c" + root_url "https://git.housh.dev/michael/swift-hpa/releases/download/v0.1.5" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "81fbda33673ec59512c69f1029c4054354f2b8467eb805fbab9c0e486064d4f2" end depends_on xcode: ["16.0", :build] + depends_on "just" => :build + depends_on "ansible" + depends_on "imagemagick" + depends_on "pandoc" + depends_on "texLive" uses_from_macos "swift" => :build def install - args = if OS.mac? - ["--disable-sandbox"] - else - ["--static-swift-stdlib"] - end - system "swift", "build", *args, "-c", "release", "--product", "hpa" + system "swift", "build", "--disable-sandbox", "--configuration", "release", "--product", "hpa" bin.install ".build/release/hpa" generate_completions_from_executable(bin/"hpa", "--generate-completion-script") end test do - system "true" + system "#{bin}/hpa", "--version" end end