Skip to content

Commit ea8ba54

Browse files
committed
Add short commit hash to README when publishing
1 parent 993573c commit ea8ba54

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/workflows/gitpod-web-docker.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
4040
- name: Build
4141
run: |
42-
yarn run build:gitpod-web
42+
yarn build:gitpod-web
43+
yarn --cwd gitpod-web/ inject-commit-hash
4344
4445
- name: Docker build and push
4546
uses: docker/build-push-action@v3

gitpod-web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,7 @@
612612
},
613613
"scripts": {
614614
"vscode:prepublish": "yarn build:webview && webpack --mode production",
615+
"inject-commit-hash": "echo 'Built from `'$(git rev-parse --short HEAD)'`' >> README.md",
615616
"webpack": "webpack --mode development",
616617
"compile": "tsc -b",
617618
"watch": "tsc -b -w",

0 commit comments

Comments
 (0)