Created
April 18, 2020 12:39
-
-
Save pirey/6dffd2e00cf50ce1ae7c37c6882e8aa6 to your computer and use it in GitHub Desktop.
Script to build react app as archive
This file contains hidden or 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
| #!/bin/sh | |
| CURRENT_TAG=$(git tag --points-at HEAD) | |
| CURRENT_DATE=$(date +%Y-%m-%d_%H%M%S) | |
| rm -rf ./build | |
| npm run build | |
| mkdir -p dist | |
| cd build && tar -zcvf ../dist/build-${CURRENT_TAG}-${CURRENT_DATE}.tar.gz . && cd - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment