Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117753782
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/drydocker/generic_obs.sh b/drydocker/generic_obs.sh
index 50dbf11..42af728 100644
--- a/drydocker/generic_obs.sh
+++ b/drydocker/generic_obs.sh
@@ -1,107 +1,107 @@
#!/bin/bash
function obs_build_local {
pushd /srv >&3
osc co Kolab:Development/${PACKAGE} >&3
pushd Kolab:Development/${PACKAGE} >&3
# Remove all compressed content not debian.tar.gz
find . \
-mindepth 1 \
-maxdepth 1 \
-type f \
-name "*.tar.gz" \
! -name "debian.tar.gz" \
-delete
# Remove _service file
rm -rf _service
# Obtain and copy in sources
pushd /srv/${PACKAGE}.git >&3
short_rev=$(git rev-parse --short HEAD)
long_rev=$(git rev-parse HEAD)
echo "Branches that contain ${COMMIT}:" >&3
git branch --contains ${long_rev} >&3
stable_branch=$(git branch --contains ${long_rev} | \
sed -r \
-e 's/^\* //g' \
-e 's/^ //g' | \
grep -E "^(master|${PACKAGE})" | \
sort --version-sort -u | \
tail -n 2 | \
head -n 1)
echo "We pick ${stable_branch}" >&3
latest_stable_branch=$(git branch -la | \
sed -r \
-e 's/^\* //g' \
-e 's/^ remotes\/origin\///g' \
-e '/^HEAD/d' | \
grep -E "^(master|${PACKAGE})" | \
sort --version-sort -u | \
tail -n 2 | \
head -n 1)
echo "The latest stable branch is ${latest_stable_branch}" >&3
master_version=$(echo ${latest_stable_branch} | \
awk -F. '{$NF+=1; OFS="."; print $0}')
echo "This puts the version for master at ${master_version}" >&3
tag_version=$(git tag -l | \
grep -E "^${PACKAGE}-[0-9]+\.[0-9]+" | \
grep -E "^${stable_branch}" | \
sort --version-sort -u | \
tail -n 1 | \
awk -F. '{$NF+=1; OFS="."; print $0}')
new_version=$(echo -e "${master_version}\n${tag_version}" | \
sort --version-sort -u | \
tail -n 1 | \
sed -r -e "s/(.*)-([0-9\.]+)$/\2/g")
git archive \
--prefix=${PACKAGE}-${new_version}/ HEAD | \
gzip -c > \
/srv/Kolab:Development/${PACKAGE}/${PACKAGE}-${new_version}.tar.gz
popd >&3
# Set .spec version
sed -i -r \
-e "s/^Version: .*$/Version: ${new_version}/g" \
-e "s/^Release: .*$/Release: 0.$(date +'%Y%m%d').git${short_rev}%{?dist}/g" \
${PACKAGE}.spec
# Set .dsc and .changelog version
sed -i -r \
-e "s/^Version: .*$/Version: ${new_version}~dev$(date +'%Y%m%d')-0~kolab1/g" \
-e "s/${PACKAGE}-([0-9\.]+)\.tar\.gz$/${PACKAGE}-${new_version}.tar.gz/g" \
${PACKAGE}.dsc
sed -i -r \
-e "1 s/\(.*\)/(${new_version}~dev$(date +'%Y%m%d')-0~kolab1)/g" \
debian.changelog
# Echo this through stdin for the sub-command after a while, to
# indicate trust.
( sleep 10; echo 2; ) | \
osc build \
--no-verify \
--disable-cpio-bulk-download \
--download-api-only \
--local-package \
- CentOS_6 \
+ CentOS_7 \
${PACKAGE}.spec >&3 2>&3 ; retval=$?
popd >&3
popd >&3
return ${retval}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Apr 4, 6:07 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18820489
Default Alt Text
(3 KB)
Attached To
Mode
rQA stick
Attached
Detach File
Event Timeline