Commit f214b791 authored by Dominik Charousset's avatar Dominik Charousset

Make HomeBrew PR when releasing CAF versions

parent 4b358e63
...@@ -137,7 +137,7 @@ fi ...@@ -137,7 +137,7 @@ fi
# II: two-digit (zero padded) minor version # II: two-digit (zero padded) minor version
# PP: two-digit (zero padded) patch version # PP: two-digit (zero padded) patch version
# but omit leading zeros # but omit leading zeros
version_str=$(echo "$1" | awk -F. '"{ if ($1 > 0) printf("%d%02d%02d\n", $1, $2, $3); else printf("%02d%02d\n", $2, $3) }') version_str=$(echo "$1" | awk -F. '{ if ($1 > 0) printf("%d%02d%02d\n", $1, $2, $3); else printf("%02d%02d\n", $2, $3) }')
echo ">>> patching config.hpp" echo ">>> patching config.hpp"
sed "s/#define CAF_VERSION [0-9]*/#define CAF_VERSION ${version_str}/g" < "$config_hpp_path" > .tmp_conf_hpp sed "s/#define CAF_VERSION [0-9]*/#define CAF_VERSION ${version_str}/g" < "$config_hpp_path" > .tmp_conf_hpp
...@@ -147,7 +147,7 @@ echo ; echo ...@@ -147,7 +147,7 @@ echo ; echo
echo ">>> please review the diff reported by Git for patching config.hpp:" echo ">>> please review the diff reported by Git for patching config.hpp:"
git diff git diff
echo ; echo echo ; echo
ask_permission "type [n] to abort or [y] for commiting and pushing it" ask_permission "type [n] to abort or [y] to proceed"
# piping through AWK/printf makes sure 0.15 is expanded to 0.15.0 # piping through AWK/printf makes sure 0.15 is expanded to 0.15.0
tag_version=$(echo "$1" | awk -F. '{ printf("%d.%d.%d", $1, $2, $3) }') tag_version=$(echo "$1" | awk -F. '{ printf("%d.%d.%d", $1, $2, $3) }')
...@@ -173,6 +173,12 @@ git checkout develop ...@@ -173,6 +173,12 @@ git checkout develop
curl --data '$github_json' https://api.github.com/repos/actor-framework/actor-framework/releases?access_token=$token curl --data '$github_json' https://api.github.com/repos/actor-framework/actor-framework/releases?access_token=$token
" > .make-release-steps.bash " > .make-release-steps.bash
if which brew &>/dev/null ; then
echo "\
brew bump-formula-pr --message=\"Update CAF to version $tag_version\" --url=\"https://github.com/actor-framework/actor-framework/archive/$tag_version.tar.gz\" --sha256=\"\$(git rev-parse HEAD)\" caf
" >> .make-release-steps.bash
fi
if [ -f "$blog_msg" ]; then if [ -f "$blog_msg" ]; then
echo "\ echo "\
cp "$blog_msg" "$blog_target_file" cp "$blog_msg" "$blog_target_file"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment