Add new tool to build gem
This commit is contained in:
parent
adc117972a
commit
4a084eb681
3 changed files with 24 additions and 21 deletions
|
@ -2,9 +2,10 @@
|
|||
#
|
||||
# Bump latest version to
|
||||
# - _sass/jekyll-theme-chirpy.scss
|
||||
# - assets/js/_commons/_copyright.js
|
||||
# - assets/js/.copyright.js
|
||||
# - assets/js/dist/*.js
|
||||
# - jekyll-theme-chirpy.gemspec
|
||||
# - package.json
|
||||
#
|
||||
# Required: gulp
|
||||
|
||||
|
|
22
tools/gem.sh
Executable file
22
tools/gem.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Create a ruby-gem pakcage with doc
|
||||
#
|
||||
# Required: rubygem, yard
|
||||
|
||||
set -eu
|
||||
|
||||
GEM_CONFIG="./jekyll-theme-chirpy.gemspec"
|
||||
|
||||
if [[ ! -f $GEM_CONFIG ]]; then
|
||||
echo "Error: .gemspec file not found!"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [[ -d doc ]]; then
|
||||
rm -rf doc
|
||||
fi
|
||||
|
||||
yard doc
|
||||
|
||||
gem build "$GEM_CONFIG"
|
20
tools/pv.sh
20
tools/pv.sh
|
@ -1,20 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Fetch Google Analytics Pageviews reporting cache
|
||||
# and save as 'assets/data/pagevies.json'
|
||||
#
|
||||
# Requirement:
|
||||
# - jq
|
||||
# - wget
|
||||
|
||||
set -eu
|
||||
|
||||
WORK_DIR="$(dirname "$(dirname "$(realpath "$0")")")"
|
||||
URL_FILE="${WORK_DIR}/_config.yml"
|
||||
PV_CACHE="${WORK_DIR}/assets/js/data/pageviews.json"
|
||||
|
||||
PROXY_URL="$(grep "proxy_endpoint:" "$URL_FILE" | sed "s/.*: '//g;s/'.*//")"
|
||||
|
||||
wget "$PROXY_URL" -O "$PV_CACHE"
|
||||
|
||||
echo "ls $PV_CACHE"
|
Loading…
Reference in a new issue