From 8dad38682337e890d0b97d8c69dc6ba51f4cebf3 Mon Sep 17 00:00:00 2001 From: Toan Nguyen Date: Wed, 17 Apr 2024 12:51:22 +0700 Subject: [PATCH] bump ndc-rest v0.1.2 --- Dockerfile | 2 +- Makefile | 8 ++++++-- README.md | 6 ++++++ scripts/update-deps.sh | 9 +++++++++ 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100755 scripts/update-deps.sh diff --git a/Dockerfile b/Dockerfile index 95f31a3..572bd1c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ -FROM ghcr.io/hasura/ndc-rest:v0.1.1 +FROM ghcr.io/hasura/ndc-rest:v0.1.2 COPY ./config /config \ No newline at end of file diff --git a/Makefile b/Makefile index bc63e14..a312a04 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ STRIPE_VERSION ?= v956 -NDC_REST_VERSION ?= v0.1.1 +NDC_REST_VERSION ?= v0.1.2 UID ?= $(shell id -u) GID ?= $(shell id -g) @@ -9,4 +9,8 @@ build-schema: -f https://raw.githubusercontent.com/stripe/openapi/$(STRIPE_VERSION)/openapi/spec3.json \ --trim-prefix /v1 --spec openapi3 \ --env-prefix STRIPE \ - -o /home/config/schema.json + -o /home/config/schema.json + +.PHONY: update-deps +update-deps: + VERSION=$(NDC_REST_VERSION) scripts/update-deps.sh \ No newline at end of file diff --git a/README.md b/README.md index f4f6265..5d48eb5 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,12 @@ docker-compose up -d --build The connector serves the HTTP service at `http://localhost:8080` and connect to the internal `stripe-mock` service. +### Update dependencies + +```sh +NDC_REST_VERSION=\ make update-deps +``` + ### Update schema Update `VERSION` in [Makefile](./Makefile) and run: diff --git a/scripts/update-deps.sh b/scripts/update-deps.sh new file mode 100755 index 0000000..436b8e8 --- /dev/null +++ b/scripts/update-deps.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +if [ -z "$VERSION" ]; then + echo "VERSION env variable is required" + exit 1 +fi + +sed -i -r "s/v[0-9.]+$/$VERSION/" Dockerfile +sed -i -r "s/NDC_REST_VERSION\s+\?\=\s+[a-z0-9.]+$/NDC_REST_VERSION ?= $VERSION/" Makefile \ No newline at end of file