Skip to content

Commit f9a598f

Browse files
authored
chore: new tag and contributing doc (#17)
* chore(make): update tag and move build targets By moving the `build` target to the first one, it'll be run as the default target calling `make`. * docs: generate with new version * docs: add contribution doc
1 parent 493b1f1 commit f9a598f

File tree

5 files changed

+40
-17
lines changed

5 files changed

+40
-17
lines changed

CONTRIBUTING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Development
2+
3+
## Contributing
4+
5+
Code contributions are done through [GitHub Pull requests](https://github.com/grafana/grafana-crossplane-libsonnet/pulls), each pull request requires CI to pass and at least one review. We follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/), pull requests will generally be merged with a squash merge.
6+
7+
> **Hint**: Because the generation process changes a lot of code, it is highly encouraged to put the generated code into a separate commit to make reviewing easier.
8+
>
9+
> If the branch diverges from `main`, then do a rebase and drop the commit with the generated code, followed by regenerating everything into a new commit.
10+
11+
Bugs or feature requests can go into [GitHub Issues](https://github.com/grafana/grafana-crossplane-libsonnet/issues), other questions can be asked through [GitHub Discussions](https://github.com/grafana/grafana-crossplane-libsonnet/discussions).
12+
13+
## Generation process
14+
15+
`make build` will generate the libraries and packages, including the docs in `docs/`.
16+
17+
## Directory layout
18+
19+
`generator/` is where the code generator lives.
20+
21+
`packages/` and `docs/` are completely generated, do not edit these, changes will be overwritten by the generation process.
22+
23+
`grafanaplane/` except for `grafanaplane/main.libsonnet` and `grafanaplane/example.jsonnet` are generated as well.

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
LIBRARY_VERSION:=0.1.0
1+
LIBRARY_VERSION:=0.2.0
22
PROVIDER_VERSION:=0.22.0
33
JSONNET_BIN:=jrsonnet
44
CROSSPLANE?=crossplane
@@ -7,6 +7,12 @@ SHELL:=/bin/bash
77

88
VENDOR_DEPTHS:=$(shell find generator/vendor -type f)
99

10+
.PHONY: build
11+
build: grafanaplane/raw.libsonnet grafanaplane/configurations.libsonnet packages
12+
13+
.PHONY: push
14+
push: push_packages
15+
1016
grafanaplane: grafanaplane/raw.libsonnet grafanaplane/configurations.libsonnet
1117

1218
generator/crds.yaml:
@@ -49,9 +55,3 @@ docs: $(shell find grafanaplane/ -type f)
4955
.PHONY: tag
5056
tag:
5157
git tag $(LIBRARY_VERSION)-$(PROVIDER_VERSION)
52-
53-
.PHONY: build
54-
build: grafanaplane/raw.libsonnet grafanaplane/configurations.libsonnet packages
55-
56-
.PHONY: push
57-
push: push_packages

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Most of this library is generated: the Compositions/XRDs packages, Configuration
1111
## Install
1212

1313
```
14-
jb install github.com/grafana/grafana-crossplane-libsonnet/grafanaplane@0.1.0-0.22.0
14+
jb install github.com/grafana/grafana-crossplane-libsonnet/grafanaplane@0.2.0-0.22.0
1515
```
1616

1717
## Usage

grafanaplane/configurations.libsonnet

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
name: 'grafana-namespaced-alerting',
1010
},
1111
spec: {
12-
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-alerting:0.1.0-0.22.0',
12+
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-alerting:0.2.0-0.22.0',
1313
},
1414
},
1515
cloud: {
@@ -22,7 +22,7 @@
2222
name: 'grafana-namespaced-cloud',
2323
},
2424
spec: {
25-
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-cloud:0.1.0-0.22.0',
25+
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-cloud:0.2.0-0.22.0',
2626
},
2727
},
2828
enterprise: {
@@ -35,7 +35,7 @@
3535
name: 'grafana-namespaced-enterprise',
3636
},
3737
spec: {
38-
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-enterprise:0.1.0-0.22.0',
38+
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-enterprise:0.2.0-0.22.0',
3939
},
4040
},
4141
ml: {
@@ -48,7 +48,7 @@
4848
name: 'grafana-namespaced-ml',
4949
},
5050
spec: {
51-
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-ml:0.1.0-0.22.0',
51+
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-ml:0.2.0-0.22.0',
5252
},
5353
},
5454
oncall: {
@@ -61,7 +61,7 @@
6161
name: 'grafana-namespaced-oncall',
6262
},
6363
spec: {
64-
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-oncall:0.1.0-0.22.0',
64+
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-oncall:0.2.0-0.22.0',
6565
},
6666
},
6767
oss: {
@@ -74,7 +74,7 @@
7474
name: 'grafana-namespaced-oss',
7575
},
7676
spec: {
77-
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-oss:0.1.0-0.22.0',
77+
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-oss:0.2.0-0.22.0',
7878
},
7979
},
8080
slo: {
@@ -87,7 +87,7 @@
8787
name: 'grafana-namespaced-slo',
8888
},
8989
spec: {
90-
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-slo:0.1.0-0.22.0',
90+
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-slo:0.2.0-0.22.0',
9191
},
9292
},
9393
sm: {
@@ -100,7 +100,7 @@
100100
name: 'grafana-namespaced-sm',
101101
},
102102
spec: {
103-
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-sm:0.1.0-0.22.0',
103+
package: 'ghcr.io/grafana/crossplane/grafana-namespaced-sm:0.2.0-0.22.0',
104104
},
105105
},
106106
}

grafanaplane/version.libsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
'0.1.0-0.22.0'
1+
'0.2.0-0.22.0'

0 commit comments

Comments
 (0)