-
Notifications
You must be signed in to change notification settings - Fork 213
/
sync-landing.sh
executable file
·43 lines (33 loc) · 799 Bytes
/
sync-landing.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
35
36
37
38
39
40
41
42
43
#!/bin/sh
#
# This file is part of Blokada.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
#
# Copyright © 2023 Blocka AB. All rights reserved.
#
# @author Karol Gusak ([email protected])
#
set -e
cd landing-github-pages
git checkout master
git pull
cd ..
cd landing
hash=$(git describe --abbrev=4 --always --tags --dirty)
echo "Syncing landing to live: $hash..."
yarn install
yarn build
cp -r dist/* ../landing-github-pages/
echo "$hash" > ../landing-github-pages/version.txt
cd ..
commit="publish landing: $hash"
cd landing-github-pages
git add .
git commit -am "$commit"
git tag "deploy-$hash"
git push
git push --tags
echo "Done"