-
Notifications
You must be signed in to change notification settings - Fork 212
/
sync-landing.sh
executable file
·44 lines (34 loc) · 820 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
44
#!/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
git submodule update
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"