Skip to content

Commit

Permalink
Add: 追加のバージョン情報をビルドプロセスに統合
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Nov 9, 2024
1 parent 298b7dd commit 2da2bed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build_preview_pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- name: Build
run: |
npm run storybook:build -- --output-dir $(pwd)/dist_preview/storybook
# 追加のバージョン情報
if [ -n "${{ github.event.pull_request.head.sha }}" ]; then
LOCATION="PR#${{ github.event.pull_request.number }}"
SHORT_SHA=$(cut -c 1-7 <<< "${{ github.event.pull_request.head.sha }}")
Expand All @@ -32,6 +32,10 @@ jobs:
SHORT_SHA=$(cut -c 1-7 <<< "${{ github.sha }}")
fi
# Storybookのビルド
npm run storybook:build -- --output-dir $(pwd)/dist_preview/storybook
# ブラウザ版エディタのビルド
VITE_EXTRA_VERSION_INFO="${LOCATION} @ ${SHORT_SHA}" \
npm run browser:build -- --base ./ --outDir $(pwd)/dist_preview/editor
Expand Down
1 change: 1 addition & 0 deletions src/components/Menu/MenuBar/MenuBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const store = useStore();
const { registerHotkeyWithCleanup } = useHotkeyManager();
const currentVersion = ref("");
/** 追加のバージョン情報。コミットハッシュなどを書ける。 */
const extraVersionInfo = import.meta.env.VITE_EXTRA_VERSION_INFO;
const audioKeys = computed(() => store.state.audioKeys);
Expand Down

0 comments on commit 2da2bed

Please sign in to comment.