From cc6b26a145e9312e9d8c9444f0cae212b695d578 Mon Sep 17 00:00:00 2001 From: b5 Date: Wed, 31 Jan 2018 14:32:03 -0500 Subject: [PATCH] feat(makefile): added make build command also updated readme to add build instructions --- Dockerfile | 2 +- Makefile | 36 +++++++++++++++++++++++++++++------- README.md | 40 +++++++++++++++++++++++++++++++++++++--- 3 files changed, 67 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 31083a55e..44dc436ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,5 +28,5 @@ RUN mkdir -p $IPFS_PATH && mkdir -p $QRI_PATH \ # VOLUME $IPFS_PATH # VOLUME $QRI_PATH -# Set binary as entrypoint, initalizing ipfs repo if none is mounted +# Set binary as entrypoint, initalizing ipfs & qri repos if none is mounted CMD ["qri", "connect", "--setup"] \ No newline at end of file diff --git a/Makefile b/Makefile index d4a50eec4..5652424be 100644 --- a/Makefile +++ b/Makefile @@ -3,21 +3,43 @@ GOPACKAGES = $(shell go list ./... | grep -v /vendor/ | grep qri/core) default: build +build: + @# install non-gx deps + go get -v github.com/briandowns/spinner github.com/datatogether/api/apiutil github.com/fatih/color github.com/ipfs/go-datastore github.com/olekukonko/tablewriter github.com/qri-io/analytics github.com/qri-io/bleve github.com/qri-io/dataset github.com/qri-io/doggos github.com/sirupsen/logrus github.com/spf13/cobra github.com/spf13/viper github.com/qri-io/varName github.com/qri-io/datasetDiffer github.com/datatogether/cdxj + @# install gx + go get -v -u github.com/whyrusleeping/gx github.com/whyrusleeping/gx-go + @# install gx deps. This will take time. + gx install + @# install deps with gx depenencies + go get github.com/qri-io/cafs + @# build the thing + go build + install-deps: go get -v github.com/briandowns/spinner github.com/datatogether/api/apiutil github.com/fatih/color github.com/ipfs/go-datastore github.com/olekukonko/tablewriter github.com/qri-io/analytics github.com/qri-io/bleve github.com/qri-io/dataset github.com/qri-io/doggos github.com/sirupsen/logrus github.com/spf13/cobra github.com/spf13/viper github.com/qri-io/varName github.com/qri-io/datasetDiffer github.com/datatogether/cdxj +install-gx: + go get -v -u github.com/whyrusleeping/gx github.com/whyrusleeping/gx-go + +install-gx-deps: + gx install + workdir: mkdir -p workdir -build: workdir/qri +# build: workdir/qri + +# build-native: $(GOFILES) +# go build -o workdir/native-qri . -build-native: $(GOFILES) - go build -o workdir/native-qri . +# workdir/qri: $(GOFILES) + # GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o workdir/qri . -workdir/qri: $(GOFILES) - GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o workdir/qri . +lint: + golint ./... -test: test-all +test: + go test ./... -test-all: +test-all-coverage: ./.circleci/cover.test.sh \ No newline at end of file diff --git a/README.md b/README.md index 1a32c6c11..b12c0b9f1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# qri +# [qri](http://qri.io) [![Qri](https://img.shields.io/badge/made%20by-qri-magenta.svg?style=flat-square)](https://qri.io) [![GoDoc](https://godoc.org/github.com/qri-io/qri?status.svg)](http://godoc.org/github.com/qri-io/qri) @@ -6,8 +6,27 @@ [![Codecov](https://img.shields.io/codecov/c/github/qri-io/qri.svg?style=flat-square)](https://codecov.io/gh/qri-io/qri) [![CI](https://img.shields.io/circleci/project/github/qri-io/qri.svg?style=flat-square)](https://circleci.com/gh/qri-io/qri) -Frictionless distributed data. -qri (“query”) animates data stored on the distributed web to work like a database. +#### qri is a global dataset version control system (GDVCS) built on the distributed web + +Breaking that down: + +- **global** so that if *anyone, anywhere* has published work with the same or similar datasets, you can discover it. +- Specific to **datasets** to ****solve the friction problem. datasets on qri work with each other by default +- **version control** to keep data in sync, attributing all changes to authors +- On the **distributed web** to make *all* of the data published on qri simultaneously available to on the network + +If you’re unfamiliar with *version control,* particularly the distributed kind, well you're probably viewing this document on [github](https://github.com/qri-io/qri) — which is a version control system intended for code. Its underlying technology – git – popularized some magic sauce that has inspired a generation of programmers and popularized concepts at the heart of the distributed web. Qri is applying that family of concepts to four common data problems: + +1. **Discovery** _Can I find data I’m looking for?_ +2. **Trust** _Can I trust what I’ve found?_ +3. **Friction** _Can I make this work with my other stuff?_ +4. **Sync** _How do I handle changes in data?_ + +Using because qri is *global* and *content-addressed* adding data to qri also checks the entire network if someone has added it before. Because qri is focused solely on datasets, it can provide meaningful search results. Every change on qri is associated with a peer, creating a audit-able trail you can use to quickly see what has changed and who has changed it. All datasets on qri are automatically described at the time of ingest using a flexible schema that makes data naturally inter-operate. Qri comes with tools to turn *all* datasets on the network into a JSON API with a single command. Finally, all changes in qri are tracked & synced. + +

+ +

## Getting Involved @@ -15,6 +34,21 @@ We would love involvement from more people! If you notice any errors or would like to submit changes, please see our [Contributing Guidelines](./.github/CONTRIBUTING.md). +## Building From Source + +To build qri you'll need the [go programming language](https://golang.org) on your machine. then run: +```shell +$ go get github.com/qri-io/qri +$ cd $GOPATH/src/github.com/qri-io/qri +$ make build +``` + +It'll take a minute, but once everything's finished a new binary `qri` will appear in this directory. you should be able to run: +```shell +$ ./qri help +``` +and see help output. + ## Developing We've set up a separate document for [developer guidelines](https://github.com/qri-io/qri/blob/master/DEVELOPERS.md)!