Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ceph*setup: Rewrite the src/ceph_version file to accurately reflect r… #2028

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ceph-dev-new-setup/build/build
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ echo current version $cephver

srcdir=`pwd`

rewrite_ceph_version_file

if [ -d "$releasedir/$cephver" ]; then
echo "$releasedir/$cephver already exists; reuse that release tarball"
else
Expand Down
2 changes: 2 additions & 0 deletions ceph-dev-setup/build/build
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ echo current version $cephver

srcdir=`pwd`

rewrite_ceph_version_file

if [ -d "$releasedir/$cephver" ]; then
echo "$releasedir/$cephver already exists; reuse that release tarball"
else
Expand Down
2 changes: 2 additions & 0 deletions ceph-setup/build/build
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ echo current version $cephver

srcdir=`pwd`

rewrite_ceph_version_file

if [ -d "$releasedir/$cephver" ]; then
echo "$releasedir/$cephver already exists; reuse that release tarball"
else
Expand Down
16 changes: 16 additions & 0 deletions scripts/build_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1657,3 +1657,19 @@ function set_centos_python3_version() {
sudo dnf reinstall -y $EXPECTED_PYTHON3_VERSION || sudo dnf install -y $EXPECTED_PYTHON3_VERSION
sudo ln -fs /usr/bin/$EXPECTED_PYTHON3_VERSION /usr/bin/python3
}

# rewrites src/ceph_release with the appropriate release type.
# in the ceph-setup job, $RELEASE_TYPE will be defined.
# in ceph-dev-{setup,new-setup}, it's not defined so it's a dev release
function rewrite_ceph_version_file() {
if [ "$RELEASE_TYPE" == "STABLE" ]; then
echo "Writing 'stable' to src/ceph_release file"
sed -i '$ s/.*/stable/g' src/ceph_release
elif [ "$RELEASE_TYPE" == "RELEASE_CANDIDATE" ]; then
echo "Writing 'rc' to src/ceph_release file"
sed -i '$ s/.*/rc/g' src/ceph_release
else
echo "Writing 'dev' to src/ceph_release file"
sed -i '$ s/.*/dev/g' src/ceph_release
fi
}