Skip to content

Commit 65d4147

Browse files
authored
feat: Added support for modules being able to supply a default value for a parameter when the condition is not met. Also improved documentation. (#420)
* feat: Added support for modules being able to supply a default value for a parameter when the condition is not met. Also improved documentation. * Bumped go version in github action
1 parent a05fe27 commit 65d4147

File tree

18 files changed

+253
-503
lines changed

18 files changed

+253
-503
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ orbs:
66

77
variables:
88
- &workspace /home/circleci/project
9-
- &build-image circleci/golang:1.13.8
9+
- &build-image circleci/golang:1.16.8
1010

1111
aliases:
1212
# Shallow Clone - this allows us to cut the 2 minute repo clone down to about 10 seconds for repos with 50,000 commits+

.github/workflows/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ jobs:
1010
- uses: actions/checkout@v2
1111
- uses: actions/setup-go@v2
1212
with:
13-
go-version: 1.12
13+
go-version: 1.16
1414
- uses: actions/cache@v2
1515
with:
1616
path: ~/go/pkg/mod
1717
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
1818
restore-keys: |
1919
${{ runner.os }}-go-
20-
- name: Run Go Tests
20+
- name: Run Go Tests
2121
run: |
2222
make check

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Slack](https://img.shields.io/badge/slack-join-brightgreen?logo=slack&style=social)](https://slack.getzero.dev)
44

55
<p align="center" width="100%">
6-
<img width="66%" src="https://raw.githubusercontent.com/commitdev/zero/main/docs/img/logo.png">
6+
<img width="66%" src="https://raw.githubusercontent.com/commitdev/zero/main/docs-site/logo.png">
77
</p>
88

99
## What is Zero
@@ -23,7 +23,7 @@ Everything built by Zero is yours. After using Zero to generate your infrastruct
2323

2424
It's easy to get started, the only thing you'll need is an AWS account. Just enter your AWS CLI tokens or choose your existing profile during the setup process and everything is built for you automatically using infrastructure-as-code so you can see exactly what's happening and easily modify it if necessary.
2525

26-
[Read about the day-to-day experience of using a system set up using Zero](docs/real-world-usage.md)
26+
[Read about the day-to-day experience of using a system set up using Zero](https://getzero.dev/docs/zero/about/real-world-usage)
2727

2828

2929
## Why is Zero Reliable, Scalable, Performant, and Secure
@@ -36,9 +36,9 @@ Security: Properly configured access-control to resources/security groups, using
3636

3737

3838
## What do you get out of the box?
39-
[Read about why we made these technology choices and where they are most applicable.](docs/technology-choices.md)
39+
[Read about why we made these technology choices and where they are most applicable.](https://getzero.dev/docs/zero/about/technology-choices)
4040

41-
[Check out some resources for learning more about these technologies.](docs/learning-resources.md)
41+
[Check out some resources for learning more about these technologies.](https://getzero.dev/docs/zero/reference/learning-resources)
4242

4343
### Infrastructure
4444
- Fully configured infrastructure-as-code AWS environment including:
@@ -78,12 +78,12 @@ ___
7878
### Project Definition:
7979
Each project is defined by this project definition file, this manifest contains your project details, and is the source of truth for the templating(`zero create`) and provision(`zero apply`) steps.
8080

81-
See [`zero-project.yml` reference](./docs/project-definition.md) for details.
81+
See [`zero-project.yml` reference](https://getzero.dev/docs/zero/reference/project-definition) for details.
8282
### Module Definition
8383
Module definition defines the information needed for the module to run (`zero apply`).
8484
Also declares dependency used to determine the order of execution with other modules.
8585

86-
See [`zero-module.yml` reference](./docs/module-definition.md) for details.
86+
See [`zero-module.yml` reference](https://getzero.dev/docs/zero/reference/module-definition) for details.
8787
___
8888

8989

cmd/zero.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package cmd
22

33
import (
4-
"fmt"
54
"os"
65

76
"github.com/spf13/cobra"
@@ -10,14 +9,17 @@ import (
109
var rootCmd = &cobra.Command{
1110
Use: "zero",
1211
Short: "zero gets you to writing code quicker.",
13-
Long: "Zero is an open-source developer platform CLI tool which makes it quick and easy for technical founders & developers \nto build quality and reliable infrastructure to launch, grow and scale high-quality SaaS applications faster and more cost-effectively.",
12+
Long: "Zero is an open-source CLI tool which makes it quick and easy for technical founders & developers \nto build high-quality, reliable infrastructure to launch, grow, and scale production-ready SaaS applications faster and more cost-effectively.\n https://getzero.dev\n",
1413
Run: func(cmd *cobra.Command, args []string) {
1514
},
1615
}
1716

1817
func Execute() {
19-
if err := rootCmd.Execute(); err != nil {
20-
fmt.Println(err)
21-
os.Exit(1)
18+
if len(os.Args) > 1 {
19+
if err := rootCmd.Execute(); err != nil {
20+
os.Exit(1)
21+
}
22+
} else { // If no arguments were provided, print the usage message.
23+
rootCmd.Help()
2224
}
2325
}

doc-site/docs/reference/module-definition.md

Lines changed: 81 additions & 74 deletions
Large diffs are not rendered by default.
File renamed without changes.

docs/img/zero-check.png

-128 KB
Binary file not shown.

docs/learning-resources.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

docs/module-definition.md

Lines changed: 0 additions & 90 deletions
This file was deleted.

docs/project-definition.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)