File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 10
10
@rsync --version | head -1
11
11
@echo
12
12
13
- .PHONY : test info
13
+ dist :
14
+ @script/package-tarball
15
+
16
+ .PHONY : test info dist
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # Usage: script/package-tarball
3
+ # Script to build a tarball release package from the current HEAD version.
4
+ # The package version comes from `git-describe --tags' so the release tag should
5
+ # be in place before this command is run.
6
+ set -e
7
+
8
+ # Change into project root
9
+ cd " $( dirname " $0 " ) " /..
10
+
11
+ # Basic package name and version.
12
+ PKG_BASE=" github-backup-utils"
13
+ PKG_VERS=" $( git describe --tags) "
14
+ PKG_NAME=" ${PKG_BASE} -${PKG_VERS} "
15
+
16
+ # Run git-archive to generate tarball
17
+ echo " Creating ${PKG_NAME} .tar.gz ..."
18
+ mkdir -p dist
19
+ git archive \
20
+ --format=tar.gz \
21
+ --prefix=" $PKG_NAME /" \
22
+ --output=" dist/${PKG_NAME} .tar.gz" \
23
+ HEAD
24
+
25
+ # List archive contents for review
26
+ gzip -dc < " dist/${PKG_NAME} .tar.gz" | tar tf -
27
+
28
+ # Output location
29
+ echo " Package dist/${PKG_NAME} .tar.gz OK"
You can’t perform that action at this time.
0 commit comments