Created
September 13, 2020 16:56
-
-
Save jayhuang75/aff6e957b374e9e8108a397e786890c9 to your computer and use it in GitHub Desktop.
make file for local development
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
.ONESHELL: | |
RELEASE_BIN=rust-hadoop-batch-control | |
RELEASE_BIN_PATH_LINUX=target/release | |
RELEASE_BIN_PATH_DARWIN=target/x86_64-unknown-linux-musl/release | |
HADOOP_NAMENODE=namenode | |
DB_LOCATION=db | |
DB_NAME=apps.db | |
.PHONY: darwin | |
darwin: | |
$(info mac build the bin for linux) | |
CC_x86_64_unknown_linux_musl="x86_64-linux-musl-gcc" cargo build --release --target=x86_64-unknown-linux-musl | |
docker cp ${RELEASE_BIN_PATH_DARWIN}/${RELEASE_BIN} ${HADOOP_NAMENODE}:${RELEASE_BIN} | |
docker cp ${DB_LOCATION}/${DB_NAME} ${HADOOP_NAMENODE}:${DB_LOCATION}/${DB_NAME} | |
.PHONY: linux | |
linux: | |
$(info linux build the bin for linux) | |
cargo build --release | |
docker cp ${RELEASE_BIN_PATH_LINUX}/${RELEASE_BIN} ${HADOOP_NAMENODE}:${RELEASE_BIN} | |
docker cp ${DB_LOCATION}/${DB_NAME} ${HADOOP_NAMENODE}:${DB_LOCATION}/${DB_NAME} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment