diff options
author | Rigel <sendmemail@rigelk.eu> | 2018-03-30 13:59:26 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-03-30 17:13:24 +0200 |
commit | d788291d2aa0dd0241958b05f2aecff886b42149 (patch) | |
tree | 4ef8add00a59fb8eacc83c655a561ef9e4eb2a0e /scripts/release.sh | |
parent | 6c42d96e4692030eb68dd60bbc61475f909d404e (diff) | |
download | PeerTube-d788291d2aa0dd0241958b05f2aecff886b42149.tar.gz PeerTube-d788291d2aa0dd0241958b05f2aecff886b42149.tar.zst PeerTube-d788291d2aa0dd0241958b05f2aecff886b42149.zip |
refactoring archive creation step to reduce code duplication and be less error-prone
Diffstat (limited to 'scripts/release.sh')
-rwxr-xr-x | scripts/release.sh | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/scripts/release.sh b/scripts/release.sh index dbc348cb2..87ac89131 100755 --- a/scripts/release.sh +++ b/scripts/release.sh | |||
@@ -61,25 +61,27 @@ rm "./client/dist/stats.json" | |||
61 | 61 | ||
62 | # Creating the archives | 62 | # Creating the archives |
63 | ( | 63 | ( |
64 | # local variables | ||
65 | directories_to_archive = ("$directory_name/CREDITS.md" "$directory_name/FAQ.md" \ | ||
66 | "$directory_name/LICENSE" "$directory_name/README.md" \ | ||
67 | "$directory_name/client/dist/" "$directory_name/client/yarn.lock" \ | ||
68 | "$directory_name/client/package.json" "$directory_name/config" \ | ||
69 | "$directory_name/dist" "$directory_name/package.json" \ | ||
70 | "$directory_name/scripts" "$directory_name/support" \ | ||
71 | "$directory_name/tsconfig.json" "$directory_name/yarn.lock") | ||
72 | maintainer_pubkey = "583A612D890159BE" | ||
73 | |||
74 | # temporary setup | ||
64 | cd .. | 75 | cd .. |
65 | ln -s "PeerTube" "$directory_name" | 76 | ln -s "PeerTube" "$directory_name" |
66 | zip -r "PeerTube/$zip_name" "$directory_name/CREDITS.md" "$directory_name/FAQ.md" \ | ||
67 | "$directory_name/LICENSE" "$directory_name/README.md" \ | ||
68 | "$directory_name/client/dist/" "$directory_name/client/yarn.lock" \ | ||
69 | "$directory_name/client/package.json" "$directory_name/config" \ | ||
70 | "$directory_name/dist" "$directory_name/package.json" \ | ||
71 | "$directory_name/scripts" "$directory_name/support" \ | ||
72 | "$directory_name/tsconfig.json" "$directory_name/yarn.lock" | ||
73 | gpg --armor --detach-sign -u 583A612D890159BE "PeerTube/$zip_name" | ||
74 | tar cfJ "PeerTube/$tar_name" "$directory_name/CREDITS.md" "$directory_name/FAQ.md" \ | ||
75 | "$directory_name/LICENSE" "$directory_name/README.md" \ | ||
76 | "$directory_name/client/dist/" "$directory_name/client/yarn.lock" \ | ||
77 | "$directory_name/client/package.json" "$directory_name/config" \ | ||
78 | "$directory_name/dist" "$directory_name/package.json" \ | ||
79 | "$directory_name/scripts" "$directory_name/support" \ | ||
80 | "$directory_name/tsconfig.json" "$directory_name/yarn.lock" | ||
81 | gpg --armor --detach-sign -u 583A612D890159BE "PeerTube/$tar_name" | ||
82 | 77 | ||
78 | # archive creation + signing | ||
79 | zip -r "PeerTube/$zip_name" "${directories_to_archive[@]}" | ||
80 | gpg --armor --detach-sign -u $maintainer_pubkey "PeerTube/$zip_name" | ||
81 | XZ_OPT=-e9 tar cfJ "PeerTube/$tar_name" "${directories_to_archive[@]}" | ||
82 | gpg --armor --detach-sign -u $maintainer_pubkey "PeerTube/$tar_name" | ||
83 | |||
84 | # temporary setup destruction | ||
83 | rm "$directory_name" | 85 | rm "$directory_name" |
84 | ) | 86 | ) |
85 | 87 | ||