Skip to content
This repository was archived by the owner on Mar 24, 2023. It is now read-only.

Commit 8fd0bc2

Browse files
authored
Merge pull request #291 from dexhorthy/ui
commit empty ui, update makefile for generating ignored UI
2 parents 964c6ee + 1e58b8a commit 8fd0bc2

File tree

5 files changed

+103
-203
lines changed

5 files changed

+103
-203
lines changed

CONTRIBUTING.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
Contributing
2+
=============
3+
4+
This is a living document and is to be expanded. As of its initial writing, this document's main goal is to create a home for
5+
intructions pertaining to building and running the project.
6+
7+
Issues
8+
------------------------
9+
10+
Pull Requests
11+
------------------------
12+
13+
Build & Run the Project
14+
------------------------
15+
16+
### Prerequisites
17+
18+
Ensure you have (min versions to be added):
19+
20+
- `yarn`
21+
- `go`
22+
- `node`
23+
24+
### First time build
25+
26+
The first time you build ship, you'll need to run the following
27+
28+
```
29+
make build-ui embed-ui build
30+
```
31+
32+
If you're planning to only work on "headless" modes, you can omit the `build-ui` and `embed-ui` steps.
33+
34+
### Running
35+
36+
To run your locally-built copy of ship, use
37+
38+
```
39+
./bin/ship init <chart-path>
40+
```
41+
42+
for example,
43+
44+
```
45+
./bin/ship init github.com/helm/charts/stable/nginx-ingress
46+
```
47+
48+
### Iterating
49+
50+
For iterating on the go (not the UI), you can use
51+
52+
```
53+
make build
54+
```
55+
56+
to re-build the project.
57+
58+
For iterating on the ui, you can start a webpack development server with
59+
60+
```
61+
make -C web serve_ship
62+
```
63+

Makefile

+28-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: build-deps -dep-deps docker shell githooks dep fmt _vet vet _lint lint _test test build e2e run build_yoonit_docker_image _build citest ci-upload-coverage goreleaser integration-test build_ship_integration_test build-ui embed-ui pkg/lifecycle/ui.bindatafs.go
1+
.PHONY: build-deps -dep-deps docker shell githooks dep fmt _vet vet _lint lint _test test build e2e run build_yoonit_docker_image _build citest ci-upload-coverage goreleaser integration-test build_ship_integration_test build-ui pkg/lifecycle/ui.bindatafs.go embed-ui
22

33

44
SHELL := /bin/bash
@@ -234,16 +234,37 @@ build_yoonit_docker_image:
234234
build_ship_integration_test:
235235
docker build -t $(DOCKER_REPO)/ship-e2e-test:latest -f ./integration/Dockerfile .
236236

237-
pkg/lifeycle/daemon/ui.bindatafs.go: .state/build-deps
238-
cd web; go-bindata-assetfs -pkg daemon \
239-
-o ../pkg/lifecycle/daemon/ui.bindatafs.go \
240-
-nometadata \
241-
dist/...
237+
pkg/lifeycle/daemon/ui.bindatafs.go: .state/build-deps
238+
go-bindata-assetfs -pkg daemon \
239+
-o pkg/lifecycle/daemon/ui.bindatafs.go \
240+
-prefix web/ \
241+
web/dist/...
242+
243+
.state/ui-gitignored:
244+
cd pkg/lifecycle/daemon/; git update-index --assume-unchanged ui.bindatafs.go
245+
@touch .state/ui-gitignored
246+
247+
mark-ui-gitignored: .state/ui-gitignored
248+
249+
250+
embed-ui: mark-ui-gitignored pkg/lifeycle/daemon/ui.bindatafs.go fmt
242251

243-
embed-ui: pkg/lifeycle/daemon/ui.bindatafs.go fmt
244252

245253
build-ui:
246254
$(MAKE) -C web build_ship
247255

248256
test_CI:
249257
$(MAKE) -C web test_CI
258+
259+
# this shouldn't ever have to be run, but leaving here for
260+
# posterity on how the go-bindatafs "dev" file was generated
261+
# before we marked it as ignored. the goal here is to
262+
# generate an empty bindata fs, so things are obviously wrong
263+
# rather than folks just getting an old version of the UI
264+
dev-embed-ui:
265+
mkdir -p .state/tmp/dist
266+
go-bindata-assetfs -pkg daemon \
267+
-o pkg/lifecycle/daemon/ui.bindatafs.go \
268+
-prefix .state/tmp/ \
269+
-debug \
270+
.state/tmp/dist/...

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,5 @@ For questions about using Ship, there's a [Replicated Community](https://help.re
7878

7979
For bug reports, please [open an issue](https://github.com/replicatedhq/ship/issues/new) in this repo.
8080

81+
For instructions on building the project and making contributions, see [Contributing](./CONTRIBUTING.md)
8182

pkg/lifecycle/daemon/ui.bindatafs.go

+10-196
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ embed_ship:
3535
:
3636
: Assets embedded. You will need to rebuild ship to see changes reflected
3737

38+
3839
test:
3940
yarn test
4041

0 commit comments

Comments
 (0)