-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: allow release preparation magic to also be used for real releases
- Loading branch information
1 parent
f9275ce
commit 4df8920
Showing
4 changed files
with
58 additions
and
28 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
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,25 @@ | ||
# Can be used to add a release to the ChangeLog | ||
# | ||
# Example: | ||
# awk -f changelog.awk -v REL_VERSION=9.9.9 ChangeLog > ChangeLog.ci | ||
|
||
BEGIN { | ||
if (REL_VERSION == "") | ||
die("REL_VERSION is not set") | ||
} | ||
|
||
!added && /api:/ { | ||
print REL_VERSION " " $2 | ||
print "--------" | ||
print "" | ||
print " * bug fixes" | ||
print "" | ||
added = 1 | ||
} | ||
|
||
{print} | ||
|
||
function die(msg) { | ||
print(msg) > "/dev/stderr" | ||
exit 1 | ||
} |
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,30 @@ | ||
#!/bin/bash | ||
|
||
# Replace the drbd version number in all necessary places | ||
# | ||
# Example: | ||
# version=9.1.15+ptf.16.g0a58e61fcd09 | ||
# PATH=~/work/projects/build-helpers/build-helpers:"$PATH" ./.gitlab/drbd-prepare-release.sh "$version" 1 "$version" | ||
# | ||
# Example of a real release: | ||
# version=9.1.16 | ||
# PATH=~/work/projects/build-helpers/build-helpers:"$PATH" DRBD_SOURCE_ONLINE=yes ./.gitlab/drbd-prepare-release.sh "$version" 1 "$version" | ||
|
||
version="$1" | ||
release="$2" | ||
rel_version="$3" | ||
|
||
DIR="$(dirname "$(readlink -f "$0")")" | ||
|
||
dummy-release.sh drbd "$version" "$release" drbd-kernel.spec --source-online ${DRBD_SOURCE_ONLINE:-no} | ||
|
||
sed -re "s/(#define REL_VERSION) .*/\1 \"$rel_version\"/g" drbd/linux/drbd_config.h > drbd/linux/drbd_config.h.tmp | ||
mv drbd/linux/drbd_config.h{.tmp,} | ||
|
||
for i in 7 8 9; do | ||
sed -re "s/(ENV DRBD_VERSION) .*/\1 $rel_version/g" docker/Dockerfile.rhel${i} > docker/Dockerfile.rhel${i}.tmp | ||
mv docker/Dockerfile.rhel${i}{.tmp,} | ||
done | ||
|
||
awk -f "$DIR/changelog.awk" -v REL_VERSION="$rel_version" ChangeLog > ChangeLog.tmp | ||
mv ChangeLog{.tmp,} |
This file was deleted.
Oops, something went wrong.