提交 c150b448 作者: Steven Allen

add optional lockfile support

Devs can run `make lock` to switch to using a lockfile. Then-on, `make deps`
will use this instead of the `package.json`.

License: MIT
Signed-off-by: 's avatarSteven Allen <steven@stebalien.com>
上级 fb711173
......@@ -18,6 +18,10 @@ bin/gx
bin/gx*
bin/tmp
# remove gx-lock.json when we switch to this by default
gx-lock.json
.gx/cache
vendor
.tarball
......
......@@ -398,6 +398,10 @@ all required build tools and run `gx-go rw` to rewrite all paths to use GX.
Please *don't* commit these rewritten paths when making PRs. Instead, run `gx-go
rw --fix` before committing.
Alternatively, you can use the experimental gx "lockfile" support. To do this,
run `make lock && make deps`. The advantage is that *this* won't run `gx-go rw`.
The disadvantage is that builds won't include re-written paths.
If you make changes to the protocol buffers, you will need to install the [protoc compiler](https://github.com/google/protobuf).
......
gx-path = gx/ipfs/$(shell gx deps find $(1))/$(1)
gx-deps:
# Rebuild the lockfile iff it exists.
gx-deps: $(wildcard gx-lock.json)
gx install --global
gx-go rw
if test -e gx-lock.json; then gx-go rw --fix && gx lock-install; else rm -rf vendor && gx-go rw; fi
.PHONY: gx-deps
lock: gx-lock.json
.PHONY: lock
gx-lock.json: package.json
gx-go lock-gen >gx-lock.json
ifneq ($(IPFS_GX_USE_GLOBAL),1)
gx-deps: bin/gx bin/gx-go
endif
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论