-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RSDK-804] Automatically bump homebrew versions (#15)
- Loading branch information
1 parent
8914328
commit 7647b79
Showing
8 changed files
with
121 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Bump Versions | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
schedule: | ||
- cron: '0 * * * *' # hourly | ||
workflow_dispatch: | ||
|
||
jobs: | ||
bump-versions: | ||
name: Bump Package Versions | ||
runs-on: ubuntu-latest | ||
container: | ||
image: homebrew/brew | ||
options: --user root | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Setup homebrew and git config | ||
run: | | ||
mkdir /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/viamrobotics | ||
ln -s $(pwd) /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/viamrobotics/homebrew-brews | ||
git config --global --add safe.directory '*' | ||
git config --global url."https://github.com/".insteadOf [email protected]: | ||
brew developer on | ||
- name: Bump viam-server | ||
run: ./bump-version.sh viam-server | ||
|
||
- name: Bump carto-grpc-server | ||
run: ./bump-version.sh carto-grpc-server | ||
|
||
- name: Bump orb-grpc-server | ||
run: ./bump-version.sh orb-grpc-server | ||
|
||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Auto-update of package versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,5 +22,4 @@ def install | |
system "ninja", "install" | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
class CartoGrpcServer < Formula | ||
desc "A Viam slam GRPC server for Cartographer" | ||
desc "Viam slam GRPC server for Cartographer" | ||
homepage "https://www.viam.com/" | ||
url "https://github.com/viamrobotics/slam.git", | ||
tag: "v0.1.14", | ||
tag: "v0.1.14", | ||
revision: "3d5e5c3b3e844d4a25d16d7a1d9dfffcfa0fb14b" | ||
license "Apache-2.0" | ||
head "https://github.com/viamrobotics/slam.git", branch: "main" | ||
|
||
depends_on "go" => :build | ||
depends_on "cmake" => :build | ||
depends_on "go" => :build | ||
depends_on "ninja" => :build | ||
depends_on "abseil" | ||
depends_on "boost" | ||
depends_on "ceres-solver" | ||
depends_on "grpc" | ||
depends_on "protobuf" | ||
depends_on "cairo" | ||
depends_on "googletest" | ||
depends_on "[email protected]" | ||
depends_on "openssl" | ||
depends_on "ceres-solver" | ||
depends_on "eigen" | ||
depends_on "gflags" | ||
depends_on "glog" | ||
depends_on "suite-sparse" | ||
depends_on "sphinx-doc" | ||
depends_on "googletest" | ||
depends_on "grpc" | ||
depends_on "[email protected]" | ||
depends_on "openssl" | ||
depends_on "pcl" | ||
depends_on "protobuf" | ||
depends_on "sphinx-doc" | ||
depends_on "suite-sparse" | ||
|
||
def install | ||
chdir "slam-libraries" do | ||
system "make", "buf" | ||
system "make", "buildcarto" | ||
bin.install "viam-cartographer/build/carto_grpc_server" | ||
lib.install "viam-cartographer/cartographer/build/libcartographer.a" | ||
lib.install "viam-cartographer/build/libviam-cartographer.a" | ||
(share/"cartographer/lua_files").mkpath | ||
share.install "viam-cartographer/lua_files/locating_in_map.lua" => "cartographer/lua_files/" | ||
share.install "viam-cartographer/lua_files/mapping_new_map.lua" => "cartographer/lua_files/" | ||
share.install "viam-cartographer/lua_files/updating_a_map.lua" => "cartographer/lua_files/" | ||
share.install "viam-cartographer/cartographer/configuration_files/map_builder.lua" => "cartographer/lua_files/" | ||
share.install "viam-cartographer/cartographer/configuration_files/pose_graph.lua" => "cartographer/lua_files/" | ||
share.install "viam-cartographer/cartographer/configuration_files/trajectory_builder_2d.lua" => "cartographer/lua_files/" | ||
share.install "viam-cartographer/cartographer/configuration_files/map_builder_server.lua" => "cartographer/lua_files/" | ||
share.install "viam-cartographer/cartographer/configuration_files/trajectory_builder.lua" => "cartographer/lua_files/" | ||
share.install "viam-cartographer/cartographer/configuration_files/trajectory_builder_3d.lua" => "cartographer/lua_files/" | ||
end | ||
system "make", "buf" | ||
system "make", "buildcarto" | ||
|
||
bin.install "viam-cartographer/build/carto_grpc_server" | ||
lib.install "viam-cartographer/cartographer/build/libcartographer.a" | ||
lib.install "viam-cartographer/build/libviam-cartographer.a" | ||
(share/"cartographer/lua_files").mkpath | ||
share.install "viam-cartographer/lua_files/locating_in_map.lua" => "cartographer/lua_files/" | ||
share.install "viam-cartographer/lua_files/mapping_new_map.lua" => "cartographer/lua_files/" | ||
share.install "viam-cartographer/lua_files/updating_a_map.lua" => "cartographer/lua_files/" | ||
share.install "viam-cartographer/cartographer/configuration_files/map_builder.lua" => "cartographer/lua_files/" | ||
share.install "viam-cartographer/cartographer/configuration_files/pose_graph.lua" => "cartographer/lua_files/" | ||
share.install "viam-cartographer/cartographer/configuration_files/trajectory_builder_2d.lua" => "cartographer/lua_files/" | ||
share.install "viam-cartographer/cartographer/configuration_files/map_builder_server.lua" => "cartographer/lua_files/" | ||
share.install "viam-cartographer/cartographer/configuration_files/trajectory_builder.lua" => "cartographer/lua_files/" | ||
share.install "viam-cartographer/cartographer/configuration_files/trajectory_builder_3d.lua" => "cartographer/lua_files/" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
FORMULA=$1 | ||
|
||
if [ -z $FORMULA ] | ||
then | ||
echo "Formula name missing or invalid" | ||
exit 1 | ||
fi | ||
|
||
CHECK=$(brew bump $FORMULA) | ||
CUR_VERSION=$(echo "$CHECK" | grep Current | awk '{print $4}') | ||
NEW_VERSION=$(echo "$CHECK" | grep livecheck | awk '{print $4}') | ||
|
||
if [ $CUR_VERSION = $NEW_VERSION ] | ||
then | ||
exit 0 | ||
fi | ||
|
||
brew bump-formula-pr --write-only --version $NEW_VERSION $FORMULA |