Base default opts

This commit is contained in:
2015-11-18 10:45:20 +01:00
parent 1ba20bc279
commit 0cb534116d
4 changed files with 23 additions and 28 deletions

View File

@ -47,16 +47,7 @@ do
distribution=$(get_opt distribution UNRELEASED)
urgency=$(get_opt urgency low)
commit_count=$(git rev-list --count --first-parent HEAD)
current_commit=$(git log -n 1 --pretty=format:"%h")
version_suffix=tamarin${commit_count}~${current_commit}
package_version=${version}-${version_suffix}
# Define package_version opt if not defined
if [ -z "$(get_opt package_version)" ]; then
# Share computed package version
set_opt package_version "${package_version}"
fi
package_version=${version}
# Define project_version opt if not defined
if [ -z "$(get_opt project_version)" ]; then
@ -64,7 +55,7 @@ do
set_opt project_version "${version}"
fi
echo "${project_name} (${package_version}) ${distribution}; urgency=${urgency}" >> debian/changelog
echo "${project_name} (${version}) ${distribution}; urgency=${urgency}" >> debian/changelog
echo >> debian/changelog