blob: 5da5e49ffd1211f3a3ae13378447d52c0ceb021f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#!/usr/bin/env bash
RSTAR_DEPS_BIN+=(
git
tar
)
action() {
local version="${1:-$(date +%Y.%m)}"
WORKDIR="$BASEDIR/tmp/rakudo-star-$version"
info "Creating distribution contents at $WORKDIR"
chgdir "$BASEDIR"
# Include files from this project
for file in $(git ls-files)
do
dist_include "/$file"
done
# Include the sources of all components
for src in dist/src/*
do
dist_include "/$src"
done
# Add a MANIFEST.txt
chgdir "$WORKDIR"
find . > MANIFEST.txt
# Tar it all up into a distribution tarball
info "Creating tarball out of $WORKDIR"
local tarball="$BASEDIR/dist/rakudo-star-$version.tar.gz"
mkdir -p -- "$(dirname "$tarball")"
chgdir "$BASEDIR/tmp"
tar czf "$tarball" "rakudo-star-$version"
# TODO: Create checksums
# TODO: Create PGP signature
info "Distribution tarball available at $tarball"
}
dist_include() {
mkdir -p -- "$(dirname "${WORKDIR}$1")"
cp -r -- "${BASEDIR}$1" "${WORKDIR}$1"
}
|