diff --git a/hooks/git/create-changelog-prebuild b/hooks/00-git/create-changelog-prebuild similarity index 86% rename from hooks/git/create-changelog-prebuild rename to hooks/00-git/create-changelog-prebuild index f99d912..e5a8c11 100755 --- a/hooks/git/create-changelog-prebuild +++ b/hooks/00-git/create-changelog-prebuild @@ -20,7 +20,7 @@ then else info "DEBUG DEBUG DEBUG " tagbranch="build-tag-${BUILD_TAG}" - git checkout -b ${tagbranch} + git checkout -b ${tagbranch} set_opt "tag_branch" "${tag_branch}" tags="${BUILD_TAG}" fi @@ -51,7 +51,11 @@ do current_commit=$(git log -n 1 --pretty=format:"%h") version_suffix=${commit_count}~${current_commit} - echo "${project_name} (${version}.tamarin${version_suffix}) ${distribution}; urgency=${urgency}" >> debian/changelog + package_version=${version}.tamarin${version_suffix} + # Share computed package version + set_opt package_version ${package_version} + + echo "${project_name} (${package_version}) ${distribution}; urgency=${urgency}" >> debian/changelog echo >> debian/changelog diff --git a/hooks/git/install-git-containerbuild b/hooks/00-git/install-git-containerbuild similarity index 100% rename from hooks/git/install-git-containerbuild rename to hooks/00-git/install-git-containerbuild diff --git a/hooks/01-debian/create-orig-archive-prebuild b/hooks/01-debian/create-orig-archive-prebuild new file mode 100755 index 0000000..91a8633 --- /dev/null +++ b/hooks/01-debian/create-orig-archive-prebuild @@ -0,0 +1,10 @@ +#!/bin/bash + +source "${TAMARIN_UTIL}" + +project_name=$(get_opt project_name) +src_tarball="../${project_name}_${package_version}.orig.tar.gz" + +info "Creating sources tarball ${src_tarball}" + +tar -czf "${src_tarball}" . diff --git a/hooks/debian/install-build-depends-prebuild b/hooks/01-debian/install-build-depends-prebuild similarity index 100% rename from hooks/debian/install-build-depends-prebuild rename to hooks/01-debian/install-build-depends-prebuild diff --git a/hooks/tamarin/export-dist-postbuild b/hooks/02-tamarin/export-dist-postbuild similarity index 92% rename from hooks/tamarin/export-dist-postbuild rename to hooks/02-tamarin/export-dist-postbuild index 779e02e..923ef78 100755 --- a/hooks/tamarin/export-dist-postbuild +++ b/hooks/02-tamarin/export-dist-postbuild @@ -15,4 +15,5 @@ move_output_to_dist "*.changes" move_output_to_dist "*.dsc" move_output_to_dist "*.tar.{bz2,gz,lzma,xz}" +# Configure files permissions chown -R ${HOST_UID}:${HOST_GID} /dist diff --git a/lib/build.sh b/lib/build.sh index fb1d796..3c79750 100755 --- a/lib/build.sh +++ b/lib/build.sh @@ -34,7 +34,7 @@ function build_project() cd "${workspace}" - dpkg-buildpackage -b 2> >(error) 1> >(info) + dpkg-buildpackage -us -uc 2> >(error) 1> >(info) if [ $? != 0 ]; then fatal "The build process has not completed successfuly !"