-
-
Notifications
You must be signed in to change notification settings - Fork 239
/
release.sh
executable file
·34 lines (26 loc) · 998 Bytes
/
release.sh
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
# build a new release of broot
# This isn't used for normal compilation (see https://dystroy.org/broot for instruction)
# but for building the official releases
version=$(./version.sh)
echo "Building release $version"
# make the build directory and compile for all targets
./build-all-targets.sh
# add the readme and changelog in the build directory
echo "This is broot. More info and installation instructions on https://dystroy.org/broot" > build/README.md
cp CHANGELOG.md build
# add the man page and fix its date and version
cp man/page build/broot.1
sed -i "s/#version/$version/g" build/broot.1
sed -i "s/#date/$(date +'%Y\/%m\/%d')/g" build/broot.1
# publish version number
echo "$version" > build/version
# prepare the release archive
rm broot_*.zip
cd build
zip -r "../broot_$version.zip" *
cd -
# copy it to releases folder
mkdir -p releases/broot_${version}
cp "broot_$version.zip" releases/broot_${version}
# create zip files for `cargo binstall broot`
./release-for-binstall.sh