Skip to content

Commit 6f13280

Browse files
nullfunclionello
andauthored
use the correct README.md instead of the src/README. (#1375)
Co-authored-by: Lio李歐 <[email protected]>
1 parent 314d9f1 commit 6f13280

File tree

3 files changed

+63
-35
lines changed

3 files changed

+63
-35
lines changed

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,16 @@ pre-commit:
1010
@if git diff --cached --name-only | grep -q '^src/'; then make -C src lint; fi
1111

1212
.PHONY: pre-push
13-
pre-push:
13+
pre-push: sync-readme
1414
@make -C src test
1515

1616
setup:
1717
go -C src mod tidy
18+
19+
.PHONY: sync-readme
20+
sync-readme:
21+
awk '/^## Develop Anything\. Deploy Anywhere\./{p=1} (/^## /||/^### /){if(p&&!/^## Develop Anything\. Deploy Anywhere\./){exit}} p' README.md > src/README.md; \
22+
awk '/^## Defang CLI/{p=1} (/^## /||/^### /){if(p&&!/^## Defang CLI/){exit}} p' README.md >> src/README.md; \
23+
awk '/^## Getting started/{p=1} (/^## /||/^### /){if(p&&!/^## Getting started/){exit}} p' README.md >> src/README.md; \
24+
awk '/^## Support/{p=1} (/^## /||/^### /){if(p&&!/^## Support/){exit}} p' README.md >> src/README.md; \
25+
awk '/^## Environment Variables/{p=1} (/^## /||/^### /){if(p&&!/^## Environment Variables/){exit}} p' README.md >> src/README.md

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
![Discord](https://img.shields.io/discord/1233224785450897561)
33
![GitHub Release](https://img.shields.io/github/v/release/DefangLabs/defang)
44

5-
# ![Defang](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Element_Wordmark_Slogan/JPG/Dark_Colour_Glow.jpg)
5+
### ![Defang](https://raw.githubusercontent.com/DefangLabs/defang-assets/main/Logos/Element_Wordmark_Slogan/JPG/Dark_Colour_Glow.jpg)
66

7-
### Develop Anything. Deploy Anywhere.
7+
## Develop Once. Deploy Anywhere.
88
Take your app from Docker Compose to a secure and scalable deployment on your favorite cloud in minutes.
99

10-
### Defang CLI
10+
## Defang CLI
1111
The Defang Command-Line Interface [(CLI)](https://docs.defang.io/docs/getting-started) is designed for developers who prefer to manage their workflows directly from the terminal. It offers full access to Defang’s capabilities, allowing you to build, test, and deploy applications efficiently to the cloud.
1212

13-
### Defang MCP Server
13+
## Defang MCP Server
1414
The Defang Model Context Protocol [(MCP)](https://docs.defang.io/docs/concepts/mcp) Server is tailored for developers who work primarily within integrated development environments (IDEs). It enables seamless cloud deployment from supported editors such as Cursor, Windsurf, VS Code, VS Code Insiders and Claude delivering a fully integrated experience without leaving your development environment.
1515

1616
## This repo includes:
@@ -78,7 +78,7 @@ Install the Defang CLI from one of the following sources:
7878
7979
## Support
8080
81-
- File any issues [right here on GitHub](https://github.com/DefangLabs/defang/issues)
81+
- File any issues [here](https://github.com/DefangLabs/defang/issues)
8282
8383
## Command completion
8484

src/README.md

Lines changed: 49 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,49 @@
1-
## Build
2-
```
3-
go mod download
4-
make
5-
```
6-
7-
## Run
8-
```
9-
./defang
10-
```
11-
12-
## Format Code
13-
```
14-
go fmt
15-
```
16-
17-
## Update Dependencies
18-
To regenerate the `go.mod` file:
19-
```
20-
go mod tidy
21-
```
22-
23-
## Release
24-
To release a new version, run:
25-
```
26-
make release
27-
```
28-
This will create a new tag (incrementing the patch number) and push it to the
29-
repository, triggering a new build on the CI/CD pipeline.
1+
## Develop Once. Deploy Anywhere.
2+
Take your app from Docker Compose to a secure and scalable deployment on your favorite cloud in minutes.
3+
4+
## Defang CLI
5+
The Defang Command-Line Interface [(CLI)](https://docs.defang.io/docs/getting-started) is designed for developers who prefer to manage their workflows directly from the terminal. It offers full access to Defang’s capabilities, allowing you to build, test, and deploy applications efficiently to the cloud.
6+
7+
## Getting started
8+
9+
- Read our [Getting Started](https://docs.defang.io/docs/getting-started) page
10+
- Follow the installation instructions from the [Installing](https://docs.defang.io/docs/getting-started/installing) page
11+
- Take a look at our [Samples folder](https://github.com/DefangLabs/defang/tree/main/samples) for example projects in various programming languages.
12+
- Try the AI integration by running `defang generate`
13+
- Start your new service with `defang compose up`
14+
15+
## Support
16+
17+
- File any issues [here](https://github.com/DefangLabs/defang/issues)
18+
19+
## Environment Variables
20+
21+
The Defang CLI recognizes the following environment variables:
22+
23+
- `COMPOSE_PROJECT_NAME` - The name of the project to use; overrides the name in the `compose.yaml` file
24+
- `DEFANG_ACCESS_TOKEN` - The access token to use for authentication; if not specified, uses token from `defang login`
25+
- `DEFANG_BUILD_CONTEXT_LIMIT` - The maximum size of the build context when building container images; defaults to `100MiB`
26+
- `DEFANG_CD_BUCKET` - The S3 bucket to use for the BYOC CD pipeline; defaults to `defang-cd-bucket-…`
27+
- `DEFANG_CD_IMAGE` - The image to use for the Continuous Deployment (CD) pipeline; defaults to `public.ecr.aws/defang-io/cd:public-beta`
28+
- `DEFANG_DEBUG` - set this to `1` or `true` to enable debug logging
29+
- `DEFANG_DISABLE_ANALYTICS` - If set to `true`, disables sending analytics to Defang; defaults to `false`
30+
- `DEFANG_EDITOR` - The editor to launch after new project generation; defaults to `code` (VS Code)
31+
- `DEFANG_FABRIC` - The address of the Defang Fabric to use; defaults to `fabric-prod1.defang.dev`
32+
- `DEFANG_JSON` - If set to `true`, outputs JSON instead of human-readable output; defaults to `false`
33+
- `DEFANG_HIDE_HINTS` - If set to `true`, hides hints in the CLI output; defaults to `false`
34+
- `DEFANG_HIDE_UPDATE` - If set to `true`, hides the update notification; defaults to `false`
35+
- `DEFANG_ISSUER` - The OAuth2 issuer to use for authentication; defaults to `https://auth.defang.io`
36+
- `DEFANG_MODEL_ID` - The model ID of the LLM to use for the generate/debug AI integration (Pro users only)
37+
- `DEFANG_NO_CACHE` - If set to `true`, disables pull-through caching of container images; defaults to `false`
38+
- `DEFANG_ORG` - The name of the organization to use; defaults to the user's GitHub name
39+
- `DEFANG_PREFIX` - The prefix to use for all BYOC resources; defaults to `Defang`
40+
- `DEFANG_PROVIDER` - The name of the cloud provider to use, `auto` (default), `aws`, `digitalocean`, `gcp`, or `defang`
41+
- `DEFANG_PULUMI_BACKEND` - The Pulumi backend URL or `"pulumi-cloud"`; defaults to a self-hosted backend
42+
- `DEFANG_PULUMI_DIR` - Run Pulumi from this folder, instead of spawning a cloud task; requires `--debug` (BYOC only)
43+
- `DEFANG_PULUMI_VERSION` - Override the version of the Pulumi image to use (`aws` provider only)
44+
- `NO_COLOR` - If set to any value, disables color output; by default, color output is enabled depending on the terminal
45+
- `PULUMI_ACCESS_TOKEN` - The Pulumi access token to use for authentication to Pulumi Cloud; see `DEFANG_PULUMI_BACKEND`
46+
- `PULUMI_CONFIG_PASSPHRASE` - Passphrase used to generate a unique key for your stack, and configuration and encrypted state values
47+
- `TZ` - The timezone to use for log timestamps: an IANA TZ name like `UTC` or `Europe/Amsterdam`; defaults to `Local`
48+
- `XDG_STATE_HOME` - The directory to use for storing state; defaults to `~/.local/state`
49+

0 commit comments

Comments
 (0)