From 310944b76d03f6ca297a1e67f11c41a7b5277dd4 Mon Sep 17 00:00:00 2001 From: Jingchao Date: Sat, 7 Oct 2023 22:43:52 +0800 Subject: [PATCH] feat: upstream version as main version (#31) --- Makefile | 13 +++++-------- README.md | 2 ++ UPSTREAM_VERSION | 3 +++ VERSION | 1 - docker-compose.yaml | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 UPSTREAM_VERSION delete mode 100644 VERSION diff --git a/Makefile b/Makefile index 909c3ac..b36ace8 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ # # The makefile is also responsible to populate project version information. -# + # Tweak the variables based on your project. # SHELL := /bin/bash @@ -40,11 +40,9 @@ COMMIT := $(COMMIT)$(shell git diff-files --quiet || echo '-dirty') COMMIT := $(if $(COMMIT),$(COMMIT),"Unknown") # Current version of the project. -MAJOR_VERSION = 0 -MINOR_VERSION = 1 -PATCH_VERSION = 0 +UPSTREAM_VERSION = $(shell cat UPSTREAM_VERSION | grep -E '^excalidraw:' | cut -d: -f2 | tr -d '[:space:]') BUILD_VERSION = $(COMMIT) -VERSION ?= v$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_VERSION)-$(BUILD_VERSION) +VERSION ?= $(UPSTREAM_VERSION)-$(BUILD_VERSION) CHINA_MIRROR ?= false @@ -98,12 +96,11 @@ update-docker-compose-version: ## Update images version for docker-compose @for target in $(TARGETS); do \ for registry in $(REGISTRIES); do \ image=$${registry}$(IMAGE_PREFIX)$${target}$(IMAGE_SUFFIX); \ - $(SED) -i -E "s#image: $${image}:[^ ]+#image: $${image}:$(VERSION)#g" docker-compose.yaml; \ + version=$$(cat UPSTREAM_VERSION | grep -E "^$${target}:" | cut -d: -f2 | tr -d '[:space:]')-$(COMMIT); \ + $(SED) -i -E "s#image: $${image}:[^ ]+#image: $${image}:$${version}#g" docker-compose.yaml; \ done; \ done .PHONY: bump-version -previousVersion=$(shell head -n 1 ./VERSION) bump-version: ensure-git-clean update-docker-compose-version ## Bump images version for docker-compose - echo $(VERSION) > ./VERSION @echo "PLEASE using 'git commit -a' to commit image version changes" diff --git a/README.md b/README.md index c768480..70239bc 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ open "http://localhost" # open browser, and you can using the Team work function Bump version: +excalidraw-collaboration always follow the excalidraw version, so you can only bump the appendix version. + ``` # make sure all changes are commited make images # build new image without dirty diff --git a/UPSTREAM_VERSION b/UPSTREAM_VERSION new file mode 100644 index 0000000..8054e17 --- /dev/null +++ b/UPSTREAM_VERSION @@ -0,0 +1,3 @@ +excalidraw:v0.15.0 +excalidraw-room:c0bf0ba +excalidraw-storage-backend:e321930 diff --git a/VERSION b/VERSION deleted file mode 100644 index 433ab9a..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -v0.1.0-3331458 diff --git a/docker-compose.yaml b/docker-compose.yaml index 1d57e95..048d786 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -17,4 +17,4 @@ services: room: image: excalidraw-room:v0.1.0-94d3682 ports: - - 8082:80 \ No newline at end of file + - 8082:80