如何使用Homebrew打包代码目录和脚本?
How to use Homebrew to package code directories and scripts?
我有这个Code repo that I want to package using Homebrew. I want to tap to the Github repo and run an install to pull the contents. And later, something like stackbox run
should use the starter script到运行的包裹。
我也对其他包装方式持开放态度。我知道我们可以使用它们各自的包管理器(如 pip 或 npm)来打包不同的语言。但是,我希望在这里构建整个代码库和 运行 docker 容器 - 这是我要解决的用例。
使用以下公式与 src 和 运行 docker 容器打包。
class Stackbox < Formula
desc "Create app stacks loaded with all your favourite clients, services and infra along with code boilerplates in under 5 mins."
homepage ""
url "https://github.com/Stack-Box/StackBox/archive/v1.2.0.tar.gz"
sha256 "ea9bcc6905169868ac4f5ee54b7ace6ad8ed8416d482accbcf3fb7211027436b"
depends_on "docker"
depends_on "docker-compose"
depends_on "python"
depends_on "shc"
def install
system "mkdir -p /usr/local/Cellar/stackbox/1.2.0/bin"
system "cp -a . /usr/local/Cellar/stackbox/1.2.0/"
system "shc -f ./brew/stackbox-brew.sh -o stackbox"
system "cp ./stackbox /usr/local/Cellar/stackbox/1.2.0/bin/"
end
end
我有这个Code repo that I want to package using Homebrew. I want to tap to the Github repo and run an install to pull the contents. And later, something like stackbox run
should use the starter script到运行的包裹。
我也对其他包装方式持开放态度。我知道我们可以使用它们各自的包管理器(如 pip 或 npm)来打包不同的语言。但是,我希望在这里构建整个代码库和 运行 docker 容器 - 这是我要解决的用例。
使用以下公式与 src 和 运行 docker 容器打包。
class Stackbox < Formula
desc "Create app stacks loaded with all your favourite clients, services and infra along with code boilerplates in under 5 mins."
homepage ""
url "https://github.com/Stack-Box/StackBox/archive/v1.2.0.tar.gz"
sha256 "ea9bcc6905169868ac4f5ee54b7ace6ad8ed8416d482accbcf3fb7211027436b"
depends_on "docker"
depends_on "docker-compose"
depends_on "python"
depends_on "shc"
def install
system "mkdir -p /usr/local/Cellar/stackbox/1.2.0/bin"
system "cp -a . /usr/local/Cellar/stackbox/1.2.0/"
system "shc -f ./brew/stackbox-brew.sh -o stackbox"
system "cp ./stackbox /usr/local/Cellar/stackbox/1.2.0/bin/"
end
end