Skip to content

Commit

Permalink
Jason/fix double quotes issue (#1491)
Browse files Browse the repository at this point in the history
* Fix double quotes issue

* Fix escape

* Test double quotes ""

* "Test double quotes"

* Replace git info command with shell script in package.json

* Test "double quotes"

* Add shell desc

* Test "double quotes"
  • Loading branch information
duidae authored Jun 11, 2021
1 parent e9dfdc0 commit 229f260
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions git-info.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
info=`git log -1 --oneline | sed 's/\"//g'`
echo "const info = {logMessage: \"$info\"}; export default info;" > src/static/gitInfo.ts
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"worker-loader": "^3.0.8"
},
"scripts": {
"git-info": "echo const info = {logMessage: \\\"$(git log -1 --oneline)\\\"}\\; export default info\\; > src/static/gitInfo.ts",
"git-info": "./git-info.sh",
"analyze": "source-map-explorer build/static/js/main.*",
"start": "npm run git-info; react-scripts start",
"build": "npm run git-info; npm-run-all build-wrappers build-protobuf build-ts",
Expand Down

0 comments on commit 229f260

Please sign in to comment.