Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117748024
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
new file mode 100644
index 0000000..411f809
--- /dev/null
+++ b/drydocker/generic_obs.sh
@@ -0,0 +1,105 @@
+#!/bin/bash
+
+function obs_build_local {
+ pushd /srv
+ osc co Kolab:Development/${PACKAGE}
+ pushd Kolab:Development/${PACKAGE}
+
+ # 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
+
+ short_rev=$(git rev-parse --short HEAD)
+ long_rev=$(git rev-parse HEAD)
+
+ echo "Branches that contain ${COMMIT}:"
+ git branch --contains ${long_rev}
+
+ 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}"
+
+ 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}"
+
+ master_version=$(echo ${latest_stable_branch} | \
+ awk -F. '{$NF+=1; OFS="."; print $0}')
+
+ echo "This puts the version for master at ${master_version}"
+
+ 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
+
+ # 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 \
+ ${PACKAGE}.spec
+
+ popd
+ popd
+}
diff --git a/drydocker/generic_php_lint.sh b/drydocker/generic_php_lint.sh
old mode 100755
new mode 100644
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Apr 4, 12:44 AM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18821748
Default Alt Text
(3 KB)
Attached To
Mode
rQA stick
Attached
Detach File
Event Timeline