diff options
author | Riku Voipio <riku.voipio@linaro.org> | 2014-05-10 15:11:08 +0300 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2014-05-10 15:11:08 +0300 |
commit | 7c6e7aac27df98aecd87f520b790babf89e944f5 (patch) | |
tree | 163b0446c82bc9d0f8d203ce20e039fb7ade6560 | |
parent | f053df31991afcc3f25b42160699d27d5ce2971f (diff) |
return dsc filename in .dsc
-rwxr-xr-x | jenkins-makesources | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/jenkins-makesources b/jenkins-makesources index b8e639d..a0c848a 100755 --- a/jenkins-makesources +++ b/jenkins-makesources @@ -13,6 +13,7 @@ # packaging_repo = git url to packaging # base_version = base version for package # distribution = target distro +# output_file = file to output dsc filename to - defaults to upstream_source.dsc # # variables may already by set, in that case just call this with # ./jenkins-makesources @@ -30,8 +31,14 @@ then git clone $upstream_repo $upstream_source fi -if [ ! -d $packaging_dir ] +if [ -d $packaging_dir ] then + ( + cd $packaging_dir + git fetch --all + git reset --hard origin/master + ) +else git clone $packaging_repo fi @@ -40,6 +47,7 @@ upstream_commit=`cd $upstream_source && git log -n1 --pretty=format:%h` [ -z $base_version ] && base_version=0.1.2014.05 [ -z $BUILD_NUMBER ] && BUILD_NUMBER=1 +[ -z ${output_file} ] && output_file=${upstream_source}.dsc currentdate=`date -R` pkg_version=${base_version}+git${BUILD_NUMBER}+`date +%Y%m%d`+${upstream_commit} @@ -49,11 +57,12 @@ cp -a $upstream_source "${pkg_dir}.orig" rm -rf "${pkg_dir}.orig/.git" cp -a "${pkg_dir}.orig" "${pkg_dir}" cp -a $packaging_dir "${pkg_dir}" +version=${pkg_version}-1linaro${distribution}1 -echo "Preparing ${pkg_version} for ${distribution}" +echo "Preparing ${version}" cat > ${pkg_dir}/debian/changelog << EOF -${upstream_source} (${pkg_version}-1linaro${distribution}1) ${distribution}; urgency=low +${upstream_source} (${version}) ${distribution}; urgency=low * CI - ${upstream_source} snapshot: - repository: ${upstream_repo} @@ -71,3 +80,4 @@ cd ${pkg_dir} dpkg-buildpackage -nc -us -uc -rfakeroot -S cd .. rm -rf ${pkg_dir} + |