-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·63 lines (58 loc) · 1.33 KB
/
release.sh
File metadata and controls
executable file
·63 lines (58 loc) · 1.33 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env bash
set -euo pipefail
# grab the tag (or fallback to commit SHA)
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || git rev-parse --short HEAD)
OUTDIR=dist
mkdir -p "$OUTDIR"
# Full repo
git archive \
--format=tar.gz \
--prefix="viewport ${VERSION}/" \
-o "${OUTDIR}/viewport-${VERSION}-full.tar.gz" \
HEAD
# Minimal: only runtime files
git archive \
--format=tar.gz \
--prefix="viewport ${VERSION}/" \
-o "${OUTDIR}/viewport-${VERSION}-minimal.tar.gz" \
HEAD \
viewport.py \
monitoring.py \
update.py \
logging_config.py \
validate_config.py \
css_selectors.py \
setup.sh \
minimize.sh \
uninstall.sh \
requirements.txt \
api/VERSION \
templates/ \
static/main-min.js \
static/marked-min.js \
static/main-min.css \
static/favicon* \
static/*woff2 \
static/*.png \
static/site* \
config.ini.example \
.env.example
# Bare-bones: viewport.py + deps
git archive \
--format=tar.gz \
--prefix="viewport ${VERSION}/" \
-o "${OUTDIR}/viewport-${VERSION}-no-api.tar.gz" \
HEAD \
viewport.py \
logging_config.py \
validate_config.py \
css_selectors.py \
setup.sh \
minimize.sh \
uninstall.sh \
requirements.txt \
api/VERSION \
config.ini.example \
.env.example
echo "Created:"
ls -1 "${OUTDIR}"