From 64c796ff186b547cc907d10453a4890f7d720ceb Mon Sep 17 00:00:00 2001 From: Niraj Tolia Date: Tue, 18 Oct 2022 23:15:55 -0700 Subject: [PATCH] Add git shortref to docs build (#1205) ## Description Add git version to docs build This will help us verify what version of docs has been published. This should be replaced by the git tag for production builds. ## Type of change - [x] :sunflower: Feature ## Test Plan - [x] :muscle: Manual --- docs/Makefile | 5 +++-- docs/docusaurus.config.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index d181494c0..0c51f20a7 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -7,7 +7,8 @@ CORSO_BUILD_MOD := ${CORSO_BUILD_DIR}/mod CORSO_BUILD_BIN := ${CORSO_BUILD_DIR}/bin CORSO_REPO := /go/src/github.com/alcionai/corso CORSO_LOCAL_PATH := $(shell git rev-parse --show-toplevel) -DOCSC := docker run --rm -it -p 3000:3000 -v ${PWD}:/usr/src/docs corso/docs +CORSO_VERSION := $(shell git rev-parse --short HEAD) +DOCSC := docker run --rm -it -p 3000:3000 -v ${PWD}:/usr/src/docs --env CORSO_VERSION=${CORSO_VERSION} corso/docs DOCSE := ${DOCSC} # for enforcing docker container as environment GOC := docker run --rm -it \ -v ${CORSO_LOCAL_PATH}:${CORSO_REPO} -v ${CORSO_BUILD_DIR}:${CORSO_BUILD_DIR} \ @@ -57,4 +58,4 @@ ${MDGEN_BINARY}: $(shell find ${CORSO_LOCAL_PATH}/src -type f -name *.go) $(shel clean: $(DOCSC) rm -rf docs/cli - $(DOCSC) rm -rf ${CORSO_BUILD_DIR} \ No newline at end of file + $(DOCSC) rm -rf ${CORSO_BUILD_DIR} diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index cf930f63b..a3c14f6b0 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -129,7 +129,7 @@ const config = { ], }, ], - copyright: `Copyright © ${new Date().getFullYear()}`, + copyright: `Copyright © ${new Date().getFullYear()} | Version ${process.env.CORSO_VERSION}`, }, colorMode: { defaultMode: 'dark',