Last active
March 17, 2018 02:46
-
-
Save thejohnfreeman/32b31ae80956fa859722fa84c6d42125 to your computer and use it in GitHub Desktop.
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
| # Initial build directory should just be '.'. If and when you start using | |
| # a build tool, change it to the output directory. | |
| BUILD_DIR ?= build | |
| # Default installation directory is specific to the development environment | |
| # of the primary contributor. | |
| INSTALL_DIR ?= /home/jfreeman/shared/reload-extension | |
| # Recursively list all of the Git-visible files in the current directory. | |
| # Effectively ignores temporary files and Git objects. | |
| RSYNC_OPTS := --archive --delete --exclude='/.git' --filter=':- .gitignore' --filter=".- ${HOME}/.gitignore" | |
| .PHONY: build test install | |
| build: | |
| npm run build | |
| test: | |
| npm test | |
| install: | |
| # Do not use Git because we want to install without first committing. | |
| rsync ${RSYNC_OPTS} "${BUILD_DIR}/" "${INSTALL_DIR}" |
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/bash | |
| echo 'building extension' | |
| export GIT_DIR="$(readlink --canonicalize "${GIT_DIR}")" | |
| export GIT_WORK_TREE=$(mktemp --directory) | |
| function cleanup() { | |
| rm --recursive --force "${GIT_WORK_TREE}" | |
| } | |
| trap cleanup EXIT | |
| echo "GIT_WORK_TREE='${GIT_WORK_TREE}'" | |
| mkdir --parents "${GIT_WORK_TREE}" | |
| git checkout --force | |
| cd "${GIT_WORK_TREE}" | |
| INSTALL_DIR='/home/jfreeman/shared/table-scraper' make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment