-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
50 lines (43 loc) · 1.25 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Release build script for Simpledoc Starter Kit
# Copyright (c) Sergey Romanenko
# usage: bash release.sh [version]
name="simpledoc";
version="$1";
curl "https://github.com/flextype-starter-kits/$name/archive/refs/tags/v$version.zip" -L -O;
unzip "v$version.zip";
rm "v$version.zip";
cd "$name-$version";
npm install;
npx tailwindcss -i ./assets/src/css/styles.css -o ./assets/dist/css/styles.css --minify;
rm -rf node_modules;
mkdir plugins;
cd plugins;
mkdir site;
cd site;
wget -c $(curl -ksL "https://api.github.com/repos/flextype-plugins/site/releases/latest" | jq -r ".assets[0].browser_download_url");
unzip *.zip;
rm *.zip;
rm -rf __MACOSX;
cd ../../;
cd plugins;
mkdir sitemap;
cd sitemap;
wget -c $(curl -ksL "https://api.github.com/repos/flextype-plugins/sitemap/releases/latest" | jq -r ".assets[0].browser_download_url");
unzip *.zip;
rm *.zip;
rm -rf __MACOSX;
cd ../../;
cd plugins;
mkdir twig;
cd twig;
wget -c $(curl -ksL "https://api.github.com/repos/flextype-plugins/twig/releases/latest" | jq -r ".assets[0].browser_download_url");
unzip *.zip;
rm *.zip;
rm -rf __MACOSX;
cd ../../;
rm -rf __MACOSX;
find . -name '.DS_Store' -type f -delete;
zip -r "$name-$version.zip" . ;
cd ../;
mv "$name-$version/$name-$version.zip" .;
rm -r "$name-$version/";