-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to sw.js from service-worker.js
- Loading branch information
Showing
2 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
if [ -z "$VITE__COMMIT_HASH" ]; | ||
then export VITE__COMMIT_HASH=$(git rev-parse --short HEAD); | ||
if [ -z "$VITE_COMMIT_HASH" ]; | ||
then export VITE_COMMIT_HASH=$(git rev-parse --short HEAD); | ||
fi; | ||
|
||
if [ -z "$VITE__COMMIT_MESSAGE" ]; | ||
then export VITE__COMMIT_MESSAGE="$(git log -1 --pretty=format:%s $*)"; | ||
if [ -z "$VITE_COMMIT_MESSAGE" ]; | ||
then export VITE_COMMIT_MESSAGE="$(git log -1 --pretty=format:%s $*)"; | ||
fi; | ||
|
||
if [ -z "$VITE__VERSION" ]; | ||
then export VITE__VERSION="$(node -e 'console.log(require("./package.json").version)')"; | ||
if [ -z "$VITE_VERSION" ]; | ||
then export VITE_VERSION="$(node -e 'console.log(require("./package.json").version)')"; | ||
fi; | ||
|
||
if [ -z "$VITE__REPO_URL" ]; | ||
then export VITE__REPO_URL="$(git config --get remote.origin.url)"; | ||
if [ -z "$VITE_REPO_URL" ]; | ||
then export VITE_REPO_URL="$(git config --get remote.origin.url)"; | ||
fi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
importScripts('sw.js'); |