File: run.sh

package info (click to toggle)
golang-github-grpc-ecosystem-grpc-gateway 2.20.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,236 kB
  • sloc: javascript: 357; makefile: 147; sh: 26
file content (34 lines) | stat: -rwxr-xr-x 847 bytes parent folder | download | duplicates (2)
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
#! /bin/bash

set -e

JEKYLL_VERSION=4
BUNDLE_DIR="/tmp/grpc-gateway-bundle"

if [ ! -d "${BUNDLE_DIR}" ]; then
  mkdir "${BUNDLE_DIR}"

  # Run this to update the Gemsfile.lock
  docker run --rm \
    --volume="${PWD}:/srv/jekyll" \
    -e "JEKYLL_UID=$(id -u)" \
    -e "JEKYLL_GID=$(id -g)" \
    --volume="/tmp/grpc-gateway-bundle:/usr/local/bundle" \
    -it "jekyll/builder:${JEKYLL_VERSION}" \
    bundle update
fi

if [[ ${JEKYLL_GITHUB_TOKEN} == "" ]]; then
  echo "Please set \$JEKYLL_GITHUB_TOKEN before running"
  exit 1
fi

docker run --rm \
  --volume="${PWD}:/srv/jekyll" \
  -p 35729:35729 -p 4000:4000 \
  -e "JEKYLL_UID=$(id -u)" \
  -e "JEKYLL_GID=$(id -g)" \
  -e "JEKYLL_GITHUB_TOKEN=${JEKYLL_GITHUB_TOKEN}" \
  --volume="/tmp/grpc-gateway-bundle:/usr/local/bundle" \
  -it "jekyll/builder:${JEKYLL_VERSION}" \
  jekyll serve