Skip to content

Commit 3b9449b

Browse files
committed
build: add make-archive.sh helper
1 parent 79765a0 commit 3b9449b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

contrib/release/README

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ StGit Release Checklist
2525

2626
4. Make source archive
2727

28-
- `git archive --format=tar.gz --prefix=stgit-X.Y.Z/ -o stgit-X.Y.Z.tar.gz vX.Y.Z`
29-
- Note the trailing slash in the `--prefix` value.
28+
- `./contrib/releases/make-archive.sh`
3029
- This archive will be uploaded in step 7.
3130

3231
5. Update stacked-git.github.io

contrib/release/make-archive.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
set -eu
4+
5+
OUTPUT_DIR=${1:-.}
6+
TAG=$(git describe --match 'v*.*.*' --exact-match)
7+
VER=${TAG#v}
8+
ARCHIVE="stgit-${VER}.tar.gz"
9+
10+
git archive --format=tar.gz --prefix="stgit-${VER}/" -o "${OUTPUT_DIR}/${ARCHIVE}" "${TAG}"
11+
12+
printf "%s/%s\n" "${OUTPUT_DIR}" "${ARCHIVE}"

0 commit comments

Comments
 (0)