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

<!--- Please check the type of change your PR introduces: --->
- [x] 🌻 Feature

## Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
This commit is contained in:
Niraj Tolia 2022-10-18 23:15:55 -07:00 committed by GitHub
parent 7dd3b07db4
commit 64c796ff18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -7,7 +7,8 @@ CORSO_BUILD_MOD := ${CORSO_BUILD_DIR}/mod
CORSO_BUILD_BIN := ${CORSO_BUILD_DIR}/bin CORSO_BUILD_BIN := ${CORSO_BUILD_DIR}/bin
CORSO_REPO := /go/src/github.com/alcionai/corso CORSO_REPO := /go/src/github.com/alcionai/corso
CORSO_LOCAL_PATH := $(shell git rev-parse --show-toplevel) 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 DOCSE := ${DOCSC} # for enforcing docker container as environment
GOC := docker run --rm -it \ GOC := docker run --rm -it \
-v ${CORSO_LOCAL_PATH}:${CORSO_REPO} -v ${CORSO_BUILD_DIR}:${CORSO_BUILD_DIR} \ -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: clean:
$(DOCSC) rm -rf docs/cli $(DOCSC) rm -rf docs/cli
$(DOCSC) rm -rf ${CORSO_BUILD_DIR} $(DOCSC) rm -rf ${CORSO_BUILD_DIR}

View File

@ -129,7 +129,7 @@ const config = {
], ],
}, },
], ],
copyright: `Copyright © ${new Date().getFullYear()}`, copyright: `Copyright © ${new Date().getFullYear()} | Version ${process.env.CORSO_VERSION}`,
}, },
colorMode: { colorMode: {
defaultMode: 'dark', defaultMode: 'dark',