add-tarball-release-tool #36

Merged
merged 4 commits into from Nov 21, 2017

Conversation

3 participants
Contributor

AlanGriffiths commented Nov 15, 2017

No description provided.

@AlanGriffiths AlanGriffiths requested a review from RAOF Nov 16, 2017

+VERSION_MINOR=$(grep set.MIR_VERSION_MINOR CMakeLists.txt | cut -f2 -d' ' | tr -d \))
+VERSION_PATCH=$(grep set.MIR_VERSION_PATCH CMakeLists.txt | cut -f2 -d' ' | tr -d \))
+
+VERSIONED_NAME=mir-$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH
@Saviq

Saviq Nov 16, 2017

Owner

Think we could use git describe --tags here instead?

@RAOF

RAOF Nov 17, 2017

Member

We could, if we're going to guarantee that the release tags are there at the right time :)

@Saviq

Saviq Nov 17, 2017

Owner

Well, let's!

@AlanGriffiths

AlanGriffiths Nov 17, 2017

Contributor

For building tarballs to upload to the staging PPA we likely want to take the version from CMakeLists.txt.

Also, the guarantee doesn't (yet) hold:

$ git describe --tags
v0.27.0-614-g8f4e0403c8

@Saviq

Saviq Nov 17, 2017

Owner

Well, the version from CMakeLists.txt is not enough, since there's code on top of it.

Anyway, let's discuss on the forums (will post soon).

tools/make_release_tarball
+git archive --format=tar -o $SCRATCH_DIR/$VERSIONED_NAME-wlcs.tar --prefix=$VERSIONED_NAME/tests/acceptance-tests/wayland/wlcs/ HEAD
+popd
+git archive --format=tar -o $SCRATCH_DIR/$VERSIONED_NAME.tar --prefix=$VERSIONED_NAME/ HEAD
+tar --concatenate -vf $SCRATCH_DIR/$VERSIONED_NAME.tar $SCRATCH_DIR/$VERSIONED_NAME-wlcs.tar
@Saviq

Saviq Nov 16, 2017

Owner

Could this be a loop on the output from git submodule, so we don't have to do it again when we add a new submodule?

tools/make_release_tarball
+make -C $BUILD_DIR install DESTDIR=$INSTALL_DIR
+
+mv $SCRATCH_DIR/$VERSIONED_NAME.tar.xz .
+echo "$VERSIONED_NAME.tar.xz successfully created and tested"
@Saviq

Saviq Nov 16, 2017

Owner

Could everything after the release tarball be optional? Or a separate script?

@RAOF

RAOF Nov 17, 2017

Member

It could be, but I expect we're only going to be running this script a handful of times a month. Why would you want to run it without testing that the tarball is actually buildable and installable?

@Saviq

Saviq Nov 17, 2017

Owner

So I could use it to build tarballs to upload to the staging PPA ;)

@AlanGriffiths

AlanGriffiths Nov 17, 2017

Contributor

I've added an (undocumented) "--skip-checks" option

tools/make_release_tarball
+
+echo "Generating Mir tarball…"
+git archive --format=tar -o $SCRATCH_DIR/$VERSIONED_NAME.tar --prefix=$VERSIONED_NAME/ HEAD
+for submodule in $(git submodule | cut -f 3 -d ' ')
@RAOF

RAOF Nov 17, 2017

Member

I think you mean $(git submodule | cut -f 2 -d ' ')? At least in my working tree the third field is (heads/master).

tools/make_release_tarball
+make -C $BUILD_DIR install DESTDIR=$INSTALL_DIR
+
+mv $SCRATCH_DIR/$VERSIONED_NAME.tar.xz .
+echo "$VERSIONED_NAME.tar.xz successfully created and tested"
@Saviq

Saviq Nov 16, 2017

Owner

Could everything after the release tarball be optional? Or a separate script?

@RAOF

RAOF Nov 17, 2017

Member

It could be, but I expect we're only going to be running this script a handful of times a month. Why would you want to run it without testing that the tarball is actually buildable and installable?

@Saviq

Saviq Nov 17, 2017

Owner

So I could use it to build tarballs to upload to the staging PPA ;)

@AlanGriffiths

AlanGriffiths Nov 17, 2017

Contributor

I've added an (undocumented) "--skip-checks" option

+VERSION_MINOR=$(grep set.MIR_VERSION_MINOR CMakeLists.txt | cut -f2 -d' ' | tr -d \))
+VERSION_PATCH=$(grep set.MIR_VERSION_PATCH CMakeLists.txt | cut -f2 -d' ' | tr -d \))
+
+VERSIONED_NAME=mir-$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH
@Saviq

Saviq Nov 16, 2017

Owner

Think we could use git describe --tags here instead?

@RAOF

RAOF Nov 17, 2017

Member

We could, if we're going to guarantee that the release tags are there at the right time :)

@Saviq

Saviq Nov 17, 2017

Owner

Well, let's!

@AlanGriffiths

AlanGriffiths Nov 17, 2017

Contributor

For building tarballs to upload to the staging PPA we likely want to take the version from CMakeLists.txt.

Also, the guarantee doesn't (yet) hold:

$ git describe --tags
v0.27.0-614-g8f4e0403c8

@Saviq

Saviq Nov 17, 2017

Owner

Well, the version from CMakeLists.txt is not enough, since there's code on top of it.

Anyway, let's discuss on the forums (will post soon).

RAOF approved these changes Nov 21, 2017

LGTM.

bors r+

bors bot pushed a commit that referenced this pull request Nov 21, 2017

Merge #36
36: add-tarball-release-tool r=RAOF a=AlanGriffiths

@bors bors bot merged commit b9ab579 into master Nov 21, 2017

2 checks passed

bors Build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@AlanGriffiths AlanGriffiths deleted the add-tarball-release-tool branch Nov 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment