-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
admin/make-release.sh: automate release creation
This does the absolute bare minimum to produce a release. This logic best resembles the expectations for legacy (pre-0.5) releases of Lutok. Various files are omitted as they are not required in order to build from a full `autoreconf`'ed source distribution. Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
- Loading branch information
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,5 @@ config.status | |
configure | ||
libtool | ||
lutok.pc | ||
releases | ||
stamp-h1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
*/.cirrus.yml | ||
*/.github/* | ||
*/.gitignore | ||
*/.travis.yml | ||
*/admin* | ||
*/autom4te.cache/* | ||
*/m4/libtool.m4 | ||
*/m4/ltoptions.m4 | ||
*/m4/ltsugar.m4 | ||
*/m4/ltversion.m4 | ||
*/m4/lt~obsolete.m4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
# | ||
# Create release artifacts from a release tag. | ||
# | ||
# Example: | ||
# ./admin/make-release.sh atf-0.23 | ||
|
||
set -eux | ||
|
||
tag=$1 | ||
|
||
cd "$(dirname "$(dirname "$0")")" | ||
|
||
mkdir -p releases | ||
release_root=$(realpath releases) | ||
|
||
release_dir="${release_root}/${tag}" | ||
release_artifact="${release_root}/${tag}.tar.gz" | ||
|
||
rm -Rf "${release_dir}" | ||
mkdir -p "${release_dir}" | ||
git archive "${tag}" | tar xzvf - -C "${release_dir}" | ||
cd "${release_dir}" | ||
autoreconf -is | ||
cd "${release_root}" | ||
bsdtar \ | ||
--exclude-from=${release_dir}/admin/make-release.exclude \ | ||
--uname "" --gname "" \ | ||
--uid 0 --gid 0 \ | ||
-cvpzf "${release_artifact}" "${tag}" | ||
sha256 "${release_artifact##*/}" > "${release_artifact}.sha256" |