Skip to content

Commit

Permalink
Merge pull request #27 from tideways/declarative
Browse files Browse the repository at this point in the history
Automatically update tideways-cli and tideways-daemon
  • Loading branch information
TimWolla authored Jul 16, 2024
2 parents 1c5cdb7 + 861b86d commit d074436
Show file tree
Hide file tree
Showing 8 changed files with 210 additions and 117 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,17 @@ jobs:
"${changed_files[@]}" \
--message "Update to tideways-php $(awk '$1 == "version"{gsub(/"/,"",$2); print $2}' ${changed_files[1]})"
fi
if ! git diff --quiet Formula/tideways-daemon.rb; then
ghcommit -r ${{ github.repository }} \
-b master \
--add Formula/tideways-daemon.rb \
--message "Update to tideways-daemon $(awk '$1 == "version"{gsub(/"/,"",$2); print $2}' Formula/tideways-daemon.rb)"
fi
if ! git diff --quiet Formula/tideways-cli.rb; then
ghcommit -r ${{ github.repository }} \
-b master \
--add Formula/tideways-cli.rb \
--message "Update to tideways-cli $(awk '$1 == "version"{gsub(/"/,"",$2); print $2}' Formula/tideways-cli.rb)"
fi
22 changes: 11 additions & 11 deletions Formula/tideways-cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@

class TidewaysCli < Formula
homepage 'https://tideways.com'
version '1.1.0'
version "1.1.0"
checksum = {
"arm64" => "bc4e2346129bde1b5c5ba4a30fbfb6b1ac8ab9e9af9236bf0eecc277139ad312",
"amd64" => "a09bc9f06717101892b120fe92dedf27702be5189a98fdce979a1348ca8b68ad",
}

if Hardware::CPU.arm?
url "https://tideways.s3.amazonaws.com/cli/#{version}/tideways-cli_macos_arm64-#{version}.tar.gz"
sha256 'bc4e2346129bde1b5c5ba4a30fbfb6b1ac8ab9e9af9236bf0eecc277139ad312'
else
url "https://tideways.s3.amazonaws.com/cli/#{version}/tideways-cli_macos_amd64-#{version}.tar.gz"
sha256 'a09bc9f06717101892b120fe92dedf27702be5189a98fdce979a1348ca8b68ad'
end
arch = Hardware::CPU.arm? ? "arm64" : "amd64"
url "https://tideways.s3.amazonaws.com/cli/#{version}/tideways-cli_macos_#{arch}-#{version}.tar.gz"
sha256 checksum[arch]

def install
bin.install "tideways"
end

def caveats
return <<~EOS
Follow the instructions on Tideways Profiler website
to import your application settings:
Follow the instructions on Tideways Profiler website
to import your application settings:
https://app.tideways.io/user/cli-import-settings
https://app.tideways.io/user/cli-import-settings
EOS
end
end
27 changes: 13 additions & 14 deletions Formula/tideways-daemon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

class TidewaysDaemon < Formula
homepage 'https://tideways.com'
version '1.9.2'

if Hardware::CPU.arm?
url "https://tideways.s3.amazonaws.com/daemon/#{version}/tideways-daemon_macos_arm64-#{version}.tar.gz"
sha256 '434f1f1b46c038b810b727d850dfadfe2136d0e00ed1a4200e34d847fbb3c78b'
else
url "https://tideways.s3.amazonaws.com/daemon/#{version}/tideways-daemon_macos_amd64-#{version}.tar.gz"
sha256 '7b04577b15891881860553e7097be6280db705cf52d7931f1e9869c9ad7cf6ba'
end
version "1.9.2"
checksum = {
"arm64" => "434f1f1b46c038b810b727d850dfadfe2136d0e00ed1a4200e34d847fbb3c78b",
"amd64" => "7b04577b15891881860553e7097be6280db705cf52d7931f1e9869c9ad7cf6ba",
}

arch = Hardware::CPU.arm? ? "arm64" : "amd64"
url "https://tideways.s3.amazonaws.com/daemon/#{version}/tideways-daemon_macos_#{arch}-#{version}.tar.gz"
sha256 checksum[arch]

def install
bin.install 'tideways-daemon'
bin.install 'tideways-daemon'

log_dir = var+'log/tideways'
log_dir.mkpath unless log_dir.exist?
log_dir = var+'log/tideways'
log_dir.mkpath unless log_dir.exist?
end

service do
run [opt_bin/"tideways-daemon", "--address", "127.0.0.1:9135", "--log", HOMEBREW_PREFIX/"var/log/tideways/daemon.log", "--env", "development"]
run [opt_bin/"tideways-daemon", "--address", "127.0.0.1:9135", "--log", HOMEBREW_PREFIX/"var/log/tideways/daemon.log", "--env", "development"]
end

def caveats
Expand All @@ -31,4 +31,3 @@ def caveats
EOS
end
end

26 changes: 13 additions & 13 deletions Formula/tideways-php@8.0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
require File.expand_path("../Abstract/abstract-tideways-php-extension", __dir__)

class TidewaysPhpAT80 < AbstractTidewaysPhpExtension
init
version "5.10.2"
init
version "5.10.2"
checksum = {
"arm" => "03f48d53e7b5ffd4ce4fe1a862c1a0fda784394fa4a871e1cc29a722f1811e2a",
"x86" => "957adea7387c6ec906f9e15a3ce0e12b7ace028dd4fa4be3e69a173f7a355c8a",
}

if Hardware::CPU.arm?
url "https://tideways.s3.amazonaws.com/extension/#{version}/tideways-php-#{version}-macos-arm.tar.gz"
sha256 "03f48d53e7b5ffd4ce4fe1a862c1a0fda784394fa4a871e1cc29a722f1811e2a"
else
url "https://tideways.s3.amazonaws.com/extension/#{version}/tideways-php-#{version}-macos-x86.tar.gz"
sha256 "957adea7387c6ec906f9e15a3ce0e12b7ace028dd4fa4be3e69a173f7a355c8a"
end
arch = Hardware::CPU.arm? ? "arm" : "x86"
url "https://tideways.s3.amazonaws.com/extension/#{version}/tideways-php-#{version}-macos-#{arch}.tar.gz"
sha256 checksum[arch]

def install
prefix.install "tideways-php-#{php_version}.so"
write_config_file
end
def install
prefix.install "tideways-php-#{php_version}.so"
write_config_file
end
end
26 changes: 13 additions & 13 deletions Formula/tideways-php@8.1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
require File.expand_path("../Abstract/abstract-tideways-php-extension", __dir__)

class TidewaysPhpAT81 < AbstractTidewaysPhpExtension
init
version "5.10.2"
init
version "5.10.2"
checksum = {
"arm" => "03f48d53e7b5ffd4ce4fe1a862c1a0fda784394fa4a871e1cc29a722f1811e2a",
"x86" => "957adea7387c6ec906f9e15a3ce0e12b7ace028dd4fa4be3e69a173f7a355c8a",
}

if Hardware::CPU.arm?
url "https://tideways.s3.amazonaws.com/extension/#{version}/tideways-php-#{version}-macos-arm.tar.gz"
sha256 "03f48d53e7b5ffd4ce4fe1a862c1a0fda784394fa4a871e1cc29a722f1811e2a"
else
url "https://tideways.s3.amazonaws.com/extension/#{version}/tideways-php-#{version}-macos-x86.tar.gz"
sha256 "957adea7387c6ec906f9e15a3ce0e12b7ace028dd4fa4be3e69a173f7a355c8a"
end
arch = Hardware::CPU.arm? ? "arm" : "x86"
url "https://tideways.s3.amazonaws.com/extension/#{version}/tideways-php-#{version}-macos-#{arch}.tar.gz"
sha256 checksum[arch]

def install
prefix.install "tideways-php-#{php_version}.so"
write_config_file
end
def install
prefix.install "tideways-php-#{php_version}.so"
write_config_file
end
end
26 changes: 13 additions & 13 deletions Formula/tideways-php@8.2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
require File.expand_path("../Abstract/abstract-tideways-php-extension", __dir__)

class TidewaysPhpAT82 < AbstractTidewaysPhpExtension
init
version "5.10.2"
init
version "5.10.2"
checksum = {
"arm" => "03f48d53e7b5ffd4ce4fe1a862c1a0fda784394fa4a871e1cc29a722f1811e2a",
"x86" => "957adea7387c6ec906f9e15a3ce0e12b7ace028dd4fa4be3e69a173f7a355c8a",
}

if Hardware::CPU.arm?
url "https://tideways.s3.amazonaws.com/extension/#{version}/tideways-php-#{version}-macos-arm.tar.gz"
sha256 "03f48d53e7b5ffd4ce4fe1a862c1a0fda784394fa4a871e1cc29a722f1811e2a"
else
url "https://tideways.s3.amazonaws.com/extension/#{version}/tideways-php-#{version}-macos-x86.tar.gz"
sha256 "957adea7387c6ec906f9e15a3ce0e12b7ace028dd4fa4be3e69a173f7a355c8a"
end
arch = Hardware::CPU.arm? ? "arm" : "x86"
url "https://tideways.s3.amazonaws.com/extension/#{version}/tideways-php-#{version}-macos-#{arch}.tar.gz"
sha256 checksum[arch]

def install
prefix.install "tideways-php-#{php_version}.so"
write_config_file
end
def install
prefix.install "tideways-php-#{php_version}.so"
write_config_file
end
end
26 changes: 13 additions & 13 deletions Formula/tideways-php@8.3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
require File.expand_path("../Abstract/abstract-tideways-php-extension", __dir__)

class TidewaysPhpAT83 < AbstractTidewaysPhpExtension
init
version "5.10.2"
init
version "5.10.2"
checksum = {
"arm" => "03f48d53e7b5ffd4ce4fe1a862c1a0fda784394fa4a871e1cc29a722f1811e2a",
"x86" => "957adea7387c6ec906f9e15a3ce0e12b7ace028dd4fa4be3e69a173f7a355c8a",
}

if Hardware::CPU.arm?
url "https://tideways.s3.amazonaws.com/extension/#{version}/tideways-php-#{version}-macos-arm.tar.gz"
sha256 "03f48d53e7b5ffd4ce4fe1a862c1a0fda784394fa4a871e1cc29a722f1811e2a"
else
url "https://tideways.s3.amazonaws.com/extension/#{version}/tideways-php-#{version}-macos-x86.tar.gz"
sha256 "957adea7387c6ec906f9e15a3ce0e12b7ace028dd4fa4be3e69a173f7a355c8a"
end
arch = Hardware::CPU.arm? ? "arm" : "x86"
url "https://tideways.s3.amazonaws.com/extension/#{version}/tideways-php-#{version}-macos-#{arch}.tar.gz"
sha256 checksum[arch]

def install
prefix.install "tideways-php-#{php_version}.so"
write_config_file
end
def install
prefix.install "tideways-php-#{php_version}.so"
write_config_file
end
end
Loading

0 comments on commit d074436

Please sign in to comment.