Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

release: add a script for creating bootstrapped tarballs for release #1937

Merged
merged 1 commit into from

2 participants

@theuni
Owner

As discussed at devcon. This is the reason for rearranging the bootstrapping, it creates a source tarball that does not require java/swig/autotools.

example: 'mk-release-source 10.0-Dharma' will create xbmc-10.0-Dharma.tar.gz,
ready to be uploaded and deployed. It works in a subdir and does not affect the
current working dir or git repo.

This should also solve the problem in #1934, as it will create a file called VERSION in the tarball, containing the current git tag/revision, so that it never needs to be generated in a real repo.

This will also allow debian/ubuntu to pre-bootstrap their sources and drop java/swig/autotools as build-deps.

@theuni theuni merged commit ef94c4d into from
Cory Fields release: add a script for creating bootstrapped tarballs from a speci…
…fic commit

example: 'mk-release-source 10.0-Dharma' will create xbmc-10.0-Dharma.tar.gz,
ready to be uploaded and deployed. It works in a subdir and does not affect the
current working dir or git repo.
7d078a8
@wsnipex

on some systems /bin/sh is a very simple posix shell (e.g. ubuntu 12.10 - dash), which does not support "[[ ]]" tests or pushd/popd

Owner

You are correct, this should be bash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 15, 2012
  1. release: add a script for creating bootstrapped tarballs from a speci…

    Cory Fields authored
    …fic commit
    
    example: 'mk-release-source 10.0-Dharma' will create xbmc-10.0-Dharma.tar.gz,
    ready to be uploaded and deployed. It works in a subdir and does not affect the
    current working dir or git repo.
This page is out of date. Refresh to see the latest.
Showing with 31 additions and 0 deletions.
  1. +31 −0 tools/mk-release-source
View
31 tools/mk-release-source
@@ -0,0 +1,31 @@
+#!/bin/sh
+REVISION="${1}"
+COMPRESS="gzip"
+WORKDIR="xbmc-${REVISION}"
+
+if [[ -z "${REVISION}" ]]; then echo "Usage: ${0} tag|branch|commit [gzip|xz|...]" && exit 1; fi
+if [[ -d "${WORKDIR}" ]]; then echo "${WORKDIR} dir exists, refusing to overwrite" && exit 1; fi
+if [[ -n "${2}" ]]; then COMPRESS="${2}"; fi
+
+which git >/dev/null || exit 1
+git rev-list -1 ${REVISION} >/dev/null || exit 1
+
+mkdir -p "${WORKDIR}"
+GIT_WORK_TREE="${WORKDIR}" git checkout "${REVISION}" -- . || exit 1
+
+pushd "${WORKDIR}" >/dev/null
+./bootstrap || ( rm -rf "${WORKDIR}" && exit 1 )
+popd >/dev/null
+
+pushd "${WORKDIR}/tools/android/depends" >/dev/null
+./bootstrap || ( rm -rf "${WORKDIR}" && exit 1 )
+popd >/dev/null
+
+echo "${REVISION}" > "${WORKDIR}"/VERSION
+echo "`git rev-list -1 ${REVISION}`" >> "${WORKDIR}"/VERSION
+
+tar cf "${WORKDIR}.tar" "${WORKDIR}" || ( rm -f "${WORKDIR}.tar" && rm -rf "${WORKDIR}" exit 1 )
+${COMPRESS} ${WORKDIR}.tar || ( rm -f "${WORKDIR}.tar" && rm -rf "${WORKDIR}" && exit 1 )
+
+rm -rf ${WORKDIR}
+exit 0
Something went wrong with that request. Please try again.