]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - scripts/nightly.sh
Bind expanded rows to item ids instead of row number
[github/Chocobozzz/PeerTube.git] / scripts / nightly.sh
CommitLineData
2284f202
C
1#!/bin/bash
2
3set -eu
4
5shutdown() {
6 # Get our process group id
7 # shellcheck disable=SC2009
8 PGID=$(ps -o pgid= $$ | grep -o "[0-9]*")
9
10 # Kill it in a new new process group
11 setsid kill -- -"$PGID"
12 exit 0
13}
14
15trap "shutdown" SIGINT SIGTERM
16
17today=$(date '+%F')
18directory_name="peertube-nightly-$today"
19tar_name="peertube-nightly-$today.tar.xz"
20
21npm run build
22
8ed11b89
C
23nightly_version="nightly-$today"
24sed -i 's/"version": "\([^"]\+\)"/"version": "\1-'"$nightly_version"'"/' ./package.json
25
2284f202
C
26# Creating the archives
27(
28 # local variables
29 directories_to_archive=("$directory_name/CREDITS.md" "$directory_name/FAQ.md" \
30 "$directory_name/LICENSE" "$directory_name/README.md" \
31 "$directory_name/client/dist/" "$directory_name/client/yarn.lock" \
32 "$directory_name/client/package.json" "$directory_name/config" \
33 "$directory_name/dist" "$directory_name/package.json" \
34 "$directory_name/scripts" "$directory_name/support" \
35 "$directory_name/tsconfig.json" "$directory_name/yarn.lock")
36
37 # temporary setup
38 cd ..
39 ln -s "PeerTube" "$directory_name"
40
41 XZ_OPT=-e9 tar cfJ "PeerTube/$tar_name" "${directories_to_archive[@]}"
42
43 # temporary setup destruction
44 rm "$directory_name"
45)
8ed11b89
C
46
47git checkout -- ./package.json