From 32492e64ec8f2883f258a9aadabecf204c071b9e Mon Sep 17 00:00:00 2001 From: Yuchen Ying Date: Wed, 7 Feb 2024 14:53:20 -0800 Subject: [PATCH] Bump fava version to 1.27.2 --- Dockerfile | 2 +- update.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100755 update.sh 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}