Skip to content

Commit

Permalink
expose embeds version
Browse files Browse the repository at this point in the history
  • Loading branch information
redreceipt committed Dec 30, 2024
1 parent e7b1951 commit 5c517e6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ jobs:
working-directory: web-embeds

- name: Deploy to NPM
run: yarn bump
run: |
./scripts/bump.sh
yarn build
npm publish
./flush-cdn-cache.sh
working-directory: web-embeds
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
Expand Down
6 changes: 1 addition & 5 deletions web-embeds/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,8 @@
"dev": "craco start",
"build": "node scripts/build.js",
"test": "craco test",
"bump": "yarn build && ./scripts/bump.sh && npm publish && npm version 0.0.1 && npm run flush-cdn",
"bump:minor": "yarn build && ./scripts/bump.sh minor && npm publish && npm version 0.0.1 && npm run flush-cdn",
"bump:major": "yarn build && ./scripts/bump.sh major && npm publish && npm version 0.0.1 && npm run flush-cdn",
"format": "prettier --write .",
"lint": "eslint --cache --cache-location ./node_modules/.cache/eslint .",
"flush-cdn": "./flush-cdn-cache.sh"
"lint": "eslint --cache --cache-location ./node_modules/.cache/eslint ."
},
"eslintConfig": {
"extends": [
Expand Down
3 changes: 3 additions & 0 deletions web-embeds/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ import ReactDOM from "react-dom/client";

import App from "./App";
import reportWebVitals from "./reportWebVitals";
import packageJson from "../package.json";

window.document.body.insertAdjacentHTML(
"afterbegin",
'<div id="apollos-project-widget"></div>'
);

window.apollosEmbedVersion = packageJson.version;

const root = ReactDOM.createRoot(
document.getElementById("apollos-project-widget")
);
Expand Down

0 comments on commit 5c517e6

Please sign in to comment.