-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add OL build setup for OL7, OL8, OL9
Orabug: 30619056 Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 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,38 @@ | ||
#!/bin/bash | ||
|
||
if [ "$1" = "--help" ]; then | ||
echo "Usage: $0 [build_type] [version]" | ||
exit 0 | ||
fi | ||
|
||
package_name="dtrace" | ||
tags=() | ||
|
||
build_type="$1" | ||
test -z "${build_type}" && build_type="build-dev" | ||
ver="$2" | ||
if [ -z "${ver}" ]; then | ||
spec="./buildrpm/ol8/${package_name}.spec" | ||
v="$(grep "Version:" "${spec}" | awk '{print $2}')" | ||
r="$(grep "Release:" "${spec}" | awk '{print $2}' | sed -e 's/%..dist.//g')" | ||
ver="${v}-${r}" | ||
fi | ||
|
||
tag_me() { | ||
local dist="$1" | ||
local suffix="$2" | ||
local tag_name="${dist}/${package_name}-${ver}${suffix}" | ||
|
||
$DBG git tag -d "${tag_name}" | ||
$DBG git tag -m "${build_type}" "${tag_name}" | ||
tags+=("${tag_name}") | ||
} | ||
|
||
git commit --amend --reset-author --no-edit | ||
tag_me ol7 '.x86_64' | ||
tag_me ol7 '.aarch64' | ||
tag_me ol8 '.x86_64' | ||
tag_me ol8 '.aarch64' | ||
tag_me ol9 '.x86_64' | ||
tag_me ol9 '.aarch64' | ||
echo git push -f origin "${tags[@]}" |