Mir

Merge lp:~raof/mir/add-tarball-release-tool into lp:mir

Proposed by Chris Halse Rogers
Status: Rejected
Rejected by: Alan Griffiths
Proposed branch: lp:~raof/mir/add-tarball-release-tool
Merge into: lp:mir
Diff against target: 48 lines (+44/-0)
1 file modified
tools/make_release_tarball (+44/-0)
To merge this branch: bzr merge lp:~raof/mir/add-tarball-release-tool
Reviewer Review Type Date Requested Status
Alan Griffiths Needs Fixing
Mir CI Bot continuous-integration Approve
Review via email: mp+332609@code.launchpad.net

Commit message

tools: Add a helper to generate a release tarball.

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4298
https://mir-jenkins.ubuntu.com/job/mir-ci/3750/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/5155
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5392
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5379
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5379
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5379
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5198
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5198/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5198
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5198/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5198
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5198/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5198
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5198/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5198
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/5198/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5198
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5198/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5198
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5198/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5198
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5198/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3750/rebuild

review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Mild "Needs Fixing": we should handle -h & --help

review: Needs Fixing

Unmerged revisions

4298. By Chris Halse Rogers

Add a tool to make a source tarball.

This must be run from the root of a Mir bzr tree. It will export the most recent revision
as mir-$MIR_VERSION_MAJOR.$MIR_VERSION_MINOR.$MIR_VERSION_PATCRH, test that the tarball
builds, and then test that the tarball installs.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'tools/make_release_tarball'
--- tools/make_release_tarball 1970-01-01 00:00:00 +0000
+++ tools/make_release_tarball 2017-10-23 07:19:32 +0000
@@ -0,0 +1,44 @@
1#!/bin/bash
2
3set -e
4
5VERSION_MAJOR=$(grep set.MIR_VERSION_MAJOR CMakeLists.txt | cut -f2 -d' ' | tr -d \))
6VERSION_MINOR=$(grep set.MIR_VERSION_MINOR CMakeLists.txt | cut -f2 -d' ' | tr -d \))
7VERSION_PATCH=$(grep set.MIR_VERSION_PATCH CMakeLists.txt | cut -f2 -d' ' | tr -d \))
8
9VERSIONED_NAME=mir-$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH
10
11SCRATCH_DIR=$(mktemp -d)
12BUILD_DIR=$(mktemp -d)
13INSTALL_DIR=$(mktemp -d)
14
15function cleanup() {
16 ARG=$?
17 [ -d $SCRATCH_DIR ] && rm -r $SCRATCH_DIR
18 [ -d $BUILD_DIR ] && rm -r $BUILD_DIR
19 [ -d $INSTALL_DIR ] && rm -r $INSTALL_DIR
20 exit $ARG
21}
22
23trap cleanup EXIT
24
25echo "Generating Mir tarball…"
26bzr export \
27 --per-file-timestamps \
28 --root=$VERSIONED_NAME \
29 --format=tar - \
30 | \
31 xz -9 > $SCRATCH_DIR/$VERSIONED_NAME.tar.xz
32
33(cd $SCRATCH_DIR; tar xvJf $SCRATCH_DIR/$VERSIONED_NAME.tar.xz)
34
35echo "Testing that the tarball is buildable"
36(cd $BUILD_DIR ; cmake $SCRATCH_DIR/$VERSIONED_NAME )
37make -C $BUILD_DIR -j $(nproc)
38
39echo "Testing that the tarball is installable"
40make -C $BUILD_DIR install DESTDIR=$INSTALL_DIR
41
42mv $SCRATCH_DIR/$VERSIONED_NAME.tar.xz .
43echo "$VERSIONED_NAME.tar.xz successfully created and tested"
44

Subscribers

People subscribed via source and target branches