forked from jjti/repp
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Lattice-Automation/modernize3
Modernize, simplify
- Loading branch information
Showing
137 changed files
with
4,496 additions
and
2,314 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
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,11 @@ | ||
FROM golang:1.18.3 | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
ncbi-blast+ \ | ||
primer3 | ||
|
||
WORKDIR $HOME/src | ||
ADD . . | ||
RUN go install ./cmd/repp | ||
ENTRYPOINT ["repp"] |
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,97 +1,33 @@ | ||
LOCAL_BIN=/usr/local/bin | ||
APP=${LOCAL_BIN}/repp | ||
APP_DATA=$${HOME}/.repp | ||
SETTINGS=./config/config.yaml | ||
|
||
NAME=repp | ||
VERSION=0.1.0 | ||
|
||
DIST_WIN_ZIP=${NAME}_windows_${VERSION}.zip | ||
DIST_SRC=${NAME}_src_${VERSION} | ||
DIST_SRC_TAR=${DIST_SRC}.tar.gz | ||
|
||
PLATFORM:=$(shell uname) | ||
|
||
.PHONY: test dist docs | ||
.DEFAULT_GOAL: build | ||
|
||
ifeq ($(PLATFORM),Windows_NT) | ||
$(error Windows not supported via make) | ||
endif | ||
|
||
build: | ||
go get -d | ||
env GOOS=linux go build -o ./bin/linux -v | ||
env GOOS=darwin go build -o ./bin/darwin -v | ||
env GOOS=windows go build -o ./bin/repp.exe -v | ||
.PHONY: build | ||
build: fmt lint | ||
go mod tidy | ||
go mod vendor | ||
go build -o ./bin/repp ./cmd/repp | ||
|
||
.PHONY: install | ||
install: | ||
mkdir -p $(APP_DATA) | ||
|
||
cp $(SETTINGS) $(APP_DATA)/config.yaml | ||
cp -r ./vendor/primer3_config $(APP_DATA) | ||
cp -r ./assets/addgene/db/** $(APP_DATA) | ||
cp -r ./assets/igem/db/** $(APP_DATA) | ||
cp -r ./assets/dnasu/db/** $(APP_DATA) | ||
cp ./assets/snapgene/features.tsv $(APP_DATA) | ||
cp ./assets/neb/enzymes.tsv $(APP_DATA) | ||
|
||
ifeq ($(PLATFORM),Linux) | ||
install ./bin/linux $(APP) | ||
install -C ./vendor/linux/blastn $(LOCAL_BIN) | ||
install -C ./vendor/linux/ntthal $(LOCAL_BIN) | ||
install -C ./vendor/linux/primer3_core $(LOCAL_BIN) | ||
install -C ./vendor/linux/blastdbcmd $(LOCAL_BIN) | ||
endif | ||
go install ./cmd/repp | ||
|
||
ifeq ($(PLATFORM),Darwin) | ||
install ./bin/darwin $(APP) | ||
install -C ./vendor/darwin/blastn $(LOCAL_BIN) | ||
install -C ./vendor/darwin/ntthal $(LOCAL_BIN) | ||
install -C ./vendor/darwin/primer3_core $(LOCAL_BIN) | ||
install -C ./vendor/darwin/blastdbcmd $(LOCAL_BIN) | ||
endif | ||
.PHONY: image | ||
image: | ||
docker build -t jjtimmons/repp:latest . | ||
|
||
windows: build | ||
cd scripts && makensis windows_installer.nsi | ||
image/push: image | ||
docker push jjtimmons/repp:latest | ||
|
||
all: build install | ||
.PHONY: test | ||
test: | ||
go test -timeout 200s ./internal/... | ||
|
||
dbs: | ||
cd assets && sh makeblastdbs.sh | ||
|
||
uninstall: clean | ||
rm $(APP) | ||
rm -rf $(APP_DATA) | ||
|
||
test: all | ||
go test -timeout 200s ./internal/repp | ||
|
||
dist-dir: | ||
mkdir -p ${DIST_SRC} | ||
rsync -r --delete\ | ||
--exclude={'.git','dist','test','scripts','bin/repp_install.exe','bin/repp.exe','vendor/windows','assets/addgene/addgene.json','assets/dnasu/DNASU*','assets/igem/xml*','assets/neb/*/'}\ | ||
. ${DIST_SRC} | ||
tar -czf ${DIST_SRC_TAR} ${DIST_SRC} | ||
rm -rf ${DIST_SRC} | ||
|
||
dist: windows dist-dir | ||
cp ./README.md ./docs/index.md | ||
|
||
zip ${DIST_WIN_ZIP} ./bin/repp_install.exe | ||
|
||
scp ${DIST_SRC_TAR} jjtimmons@frs.sourceforge.net:/home/frs/project/repplasmid/ | ||
scp ${DIST_WIN_ZIP} jjtimmons@frs.sourceforge.net:/home/frs/project/repplasmid/ | ||
.PHONY: docs | ||
docs: | ||
cd docs && make | ||
|
||
rm ${DIST_SRC_TAR} | ||
rm ${DIST_WIN_ZIP} | ||
docs/serve: docs | ||
cd docs && make serve | ||
|
||
docs: | ||
go run . docs | ||
cp README.md ./docs/index.md | ||
cd docs && bundle exec just-the-docs rake search:init | ||
find ./docs -name *make* -type f -exec sed -i -e 's/\/Users\/josh/~/g' {} \; | ||
rm ./docs/*-e | ||
fmt: | ||
gofmt -l ./internal | ||
|
||
docs-dev: docs | ||
cd docs && bundle exec jekyll serve | ||
lint: | ||
golangci-lint run |
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
Oops, something went wrong.