Skip to content

Commit 6722568

Browse files
committed
feat: replace 'bundle-source.sh' script with 'create-git-archive.sh' based on 'git-archive-all'
Signed-off-by: Christopher Arndt <[email protected]>
1 parent 1385535 commit 6722568

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ or output.
2020
* Added `check` make target for lv2lint check of build plugin.
2121
* Added `submodules` make target to check out DPF submodule and abort with
2222
better error if DPF is missing.
23+
* Replaced `bundle-source.sh` with `create-git-archive.sh` script based on
24+
`git-archive-all`.
2325

2426

2527
## v0.2.2 (2018-12-18)

bundle-source.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

scripts/create-git-archive.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
#
3+
# Create versioned gzipped tarball of current branch of git repo
4+
# including all sub-modules.
5+
6+
set -e
7+
8+
if ! which git-archive-all >/dev/null 2>&1; then
9+
echo "Could not find 'git-archive-all'. Please install it." >/dev/stderr
10+
exit 1
11+
fi
12+
13+
url=$(git remote get-url origin)
14+
project="${url##*/}"
15+
project="${project%.git}"
16+
#version="$(git describe --abbrev=0)$(git log -n 1 --pretty=format:"+%cd~git%h" --date=format:%Y%m%d master)"
17+
version="$(git describe --abbrev=0)"
18+
version="${version#v}"
19+
20+
# https://github.com/Kentzo/git-archive-all (install with e.g. `pipx install git-archive-all`)
21+
git-archive-all --verbose --prefix "$project-$version/" $project-$version.tar
22+
gzip "$project-$version.tar"
23+
rm -rf "$project-$version.tar"

0 commit comments

Comments
 (0)