-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
39 lines (31 loc) · 1.22 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
#!/usr/bin/bash
set -e
# ------------------------------------------------------------------------------
# Run this script before each release to update offline files.
# ------------------------------------------------------------------------------
BASEDIR=$(dirname $0)
# update deno
mkdir -p $BASEDIR/files/usr/local/bin
wget -T 30 -O $BASEDIR/files/usr/local/bin/deno.zip \
https://github.com/denoland/deno/releases/latest/download/deno-x86_64-unknown-linux-gnu.zip
unzip -o $BASEDIR/files/usr/local/bin/deno.zip -d /tmp
echo
LOCAL_DENO=/tmp/deno
$LOCAL_DENO --version
# update deno cache
rm -rf $BASEDIR/files/home/scaler/.cache/deno
mkdir -p $BASEDIR/files/home/scaler/.cache
export DENO_DIR=$BASEDIR/files/home/scaler/.cache/deno
$LOCAL_DENO cache $BASEDIR/files/home/scaler/app/scaler.ts
# test deno application
$LOCAL_DENO fmt --check $BASEDIR/files/home/scaler/app/
$LOCAL_DENO lint $BASEDIR/files/home/scaler/app/
$LOCAL_DENO check $BASEDIR/files/home/scaler/app/scaler.ts
# nginx-jwt-auth
mkdir -p $BASEDIR/files/usr/local/share
wget -O $BASEDIR/files/usr/local/share/nginx-jwt-auth.lua \
https://raw.githubusercontent.com/nordeck/nginx-jwt-auth/main/nginx-jwt-auth.lua
# completed
echo
echo "Completed successfully"
echo