diff --git a/Dockerfile b/Dockerfile index 7d8dd3c..4aaa372 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ ARG BEANCOUNT_VERSION=2.3.6 -ARG FAVA_VERSION=v1.27.1 +ARG FAVA_VERSION=v1.27.2 ARG NODE_BUILD_IMAGE=16-bullseye FROM node:${NODE_BUILD_IMAGE} as node_build_env diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..7516fbf --- /dev/null +++ b/update.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +err() { echo $1; exit 1; } + +if [[ $# -ne 0 ]] +then + BEANCOUNT_VERSION=$1 +else + BEANCOUNT_VERSION=$(git branch --show-current) +fi + +if [[ ${BEANCOUNT_VERSION} == "master" ]] +then + err "Please run update in a non-master branch" +elif ! [[ ${BEANCOUNT_VERSION} =~ v.* ]] +then + err "Beancount version should be a string matching /v.*/, got '${BEANCOUNT_VERSION}'" +fi + +BEANCOUNT_VERSION=${BEANCOUNT_VERSION#v} + +REQUIREMENTS_TXT="https://raw.githubusercontent.com/beancount/beancount/${BEANCOUNT_VERSION}/requirements.txt" + +TMPFILE=$(mktemp) + +curl -o ${TMPFILE} ${REQUIREMENTS_TXT} + +pip-compile ${TMPFILE}