Skip to content

Commit

Permalink
Merge pull request #811 from serokell/krendelhoff/chore-fix-formulae-…
Browse files Browse the repository at this point in the history
…tag-update

[Chore] Update release pipeline
  • Loading branch information
krendelhoff2 authored Jul 17, 2024
2 parents e7b66e7 + 92ade66 commit 7782dd0
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 27 deletions.
27 changes: 16 additions & 11 deletions .buildkite/pipeline-for-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,29 @@ steps:

- label: Build ubuntu source packages
key: build-ubuntu-source-packages
if: build.tag =~ /^v.*-1/
if: build.tag =~ /^v.*/
commands:
- eval "$SET_VERSION"
- nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type source
- |
if [[ "$BUILDKITE_TAG" =~ ^v.*-1 ]]; then
nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type source
else
nix develop .#docker-tezos-packages -c ./docker/build/ubuntu/build.py --type source --launchpad-sources
fi
artifact_paths:
- ./out/*

- label: Build fedora source packages
key: build-fedora-source-packages
if: build.tag =~ /^v.*-1/
if: build.tag =~ /^v.*/
commands:
- eval "$SET_VERSION"
- nix develop .#docker-tezos-packages -c ./docker/build/fedora/build.py --type source
artifact_paths:
- ./out/*

- label: Sign ubuntu source packages
if: build.tag =~ /^v.*-1/
if: build.tag =~ /^v.*/
depends_on:
- "build-ubuntu-source-packages"
key: sign-ubuntu-source-packages
Expand All @@ -44,7 +49,7 @@ steps:
- ./out/*

- label: Sign fedora source packages
if: build.tag =~ /^v.*-1/
if: build.tag =~ /^v.*/
depends_on:
- "build-fedora-source-packages"
key: sign-fedora-source-packages
Expand All @@ -56,7 +61,7 @@ steps:
- ./out/*

- label: Publish ubuntu native packages
if: build.tag =~ /^v.*-1/
if: build.tag =~ /^v.*/
depends_on:
- "sign-ubuntu-source-packages"
commands:
Expand All @@ -65,7 +70,7 @@ steps:
- nix develop .#buildkite -c ./docker/build/ubuntu/upload.py -d out

- label: Publish fedora native packages
if: build.tag =~ /^v.*-1/
if: build.tag =~ /^v.*/
depends_on:
- "sign-fedora-source-packages"
commands:
Expand All @@ -74,7 +79,7 @@ steps:
- nix develop .#buildkite -c ./docker/build/fedora/upload.py -d out

- label: build-via-docker
if: build.tag =~ /^v.*-1/
if: build.tag =~ /^v.*/
key: build-via-docker
commands:
- eval "$SET_VERSION"
Expand All @@ -85,7 +90,7 @@ steps:

- label: Build source packages from static binaries
key: build-source-packages-from-static-binaries
if: build.tag =~ /^v.*-1/
if: build.tag =~ /^v.*/
depends_on:
- "build-via-docker"
commands:
Expand All @@ -98,7 +103,7 @@ steps:

- label: Sign source packages built from static binaries
key: sign-source-packages-built-from-static-binaries
if: build.tag =~ /^v.*-1/
if: build.tag =~ /^v.*/
depends_on:
- "build-source-packages-from-static-binaries"
commands:
Expand All @@ -109,7 +114,7 @@ steps:
- ./epel/*

- label: Publish epel packages
if: build.tag =~ /^v.*-1/
if: build.tag =~ /^v.*/
depends_on:
- "sign-source-packages-built-from-static-binaries"
commands:
Expand Down
1 change: 0 additions & 1 deletion docker/package/update-test-binaries-list.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import os
import json
from .packages import packages as all_packages
from .meta import packages_meta

binaries_json_path_suffix = "tests/binaries.json"
Expand Down
23 changes: 9 additions & 14 deletions scripts/update-brew-formulae.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,15 @@

if [[ -d ./Formula ]]
then
regex="(v.*)-[0-9]*"
if [[ $1 =~ $regex ]]; then
tag="${BASH_REMATCH[0]}"
version="${BASH_REMATCH[1]}"
find ./Formula -type f \( -name 'tezos-*.rb' ! -name 'tezos-sapling-params.rb' \) \
-exec sed -i "s/version \"v.*\"/version \"$tag\"/g" {} \; \
-exec sed -i "s/:tag => \".*\"/:tag => \"$version\"/g" {} \; \
-exec sed -i "/catalina/d" {} \; \
-exec sed -i "/monterey/d" {} \; \
-exec sed -i "/arm64_monterey/d" {} \; \
-exec sed -i "/mojave/d" {} \;
else
echo "The argument does not look like a tag, which should have a form of 'v*-[0-9]*'"
fi
tag="$1"
version="$2"
find ./Formula -type f \( -name 'tezos-*.rb' ! -name 'tezos-sapling-params.rb' \) \
-exec sed -i "s/version \"v.*\"/version \"$version\"/g" {} \; \
-exec sed -i "s/:tag => \".*\"/:tag => \"$tag\"/g" {} \; \
-exec sed -i "/catalina/d" {} \; \
-exec sed -i "/monterey/d" {} \; \
-exec sed -i "/arm64_monterey/d" {} \; \
-exec sed -i "/mojave/d" {} \;
else
echo "Please run this script from the base directory (tezos-packaging)."
fi
2 changes: 1 addition & 1 deletion scripts/update-tezos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if [[ "$latest_upstream_tag" != "$our_tezos_tag" ]]; then
./scripts/update-input.py opam-repository "$full_opam_repository_tag"
git commit -a -m "[Chore] Bump Tezos sources to $packaging_tag" --gpg-sign="[email protected]"

./scripts/update-brew-formulae.sh "$packaging_tag-1"
./scripts/update-brew-formulae.sh "$latest_upstream_tag" "$packaging_tag-1"
git commit -a -m "[Chore] Update brew formulae for $packaging_tag" --gpg-sign="[email protected]"

sed -i 's/"release": "[0-9]\+"/"release": "1"/' ./meta.json
Expand Down

0 comments on commit 7782dd0

Please sign in to comment.