Skip to content

Commit cdba52b

Browse files
Merge branch 'main' into feat/bump-max-buffer
2 parents c8040f8 + f46d38d commit cdba52b

File tree

104 files changed

+12091
-5059
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+12091
-5059
lines changed

.github/workflows/go.yml

+11-12
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,23 @@ name: Go
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
jobs:
10-
1110
build:
1211
runs-on: ubuntu-latest
1312
steps:
14-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v2
1514

16-
- name: Set up Go
17-
uses: actions/setup-go@v2
18-
with:
19-
go-version: 1.19
15+
- name: Set up Go
16+
uses: actions/setup-go@v2
17+
with:
18+
go-version: 1.19
2019

21-
- name: Build
22-
run: go build -v ./...
20+
- name: Build
21+
run: go build -v ./...
2322

24-
- name: Test
25-
run: go test -v ./...
23+
- name: Test
24+
run: go test -v ./...

.github/workflows/releases.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,6 @@ jobs:
5151
GIT_COMMITTER_EMAIL: [email protected]
5252
GIT_AUTHOR_EMAIL: [email protected]
5353
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
54-
run: make docs-pr
54+
run: |
55+
make docs-pr
56+
make VARIATON=new docs-pr

Makefile

+27-12
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,42 @@ test:
99
go test ./... -p 1
1010
.PHONY: test
1111

12-
## Build & publish the documentation
12+
## Build & publish the old documentation
13+
VARIATION ?= old
14+
ifeq ($(VARIATION),old)
15+
DOCS_FOLDER = docs
16+
DOCS_GENERATED_PATH = app_data/cli/commands
17+
DOCS_REPO_URL = https://github.com/algolia/doc.git
18+
DOCS_BRANCH = master
19+
DOCS_EXTENSION = yml
20+
else ifeq ($(VARIATION),new)
21+
DOCS_FOLDER = new-world-docs
22+
DOCS_GENERATED_PATH = apps/docs/content/pages/tools/cli/commands
23+
DOCS_REPO_URL = https://github.com/algolia/new-world-docs.git
24+
DOCS_BRANCH = main
25+
DOCS_EXTENSION = mdx
26+
endif
27+
1328
docs:
14-
git clone https://github.com/algolia/doc.git "$@"
29+
git clone $(DOCS_REPO_URL) "$@"
1530

1631
.PHONY: docs-commands-data
1732
docs-commands-data: docs
18-
git -C docs pull
19-
git -C docs checkout master
20-
git -C docs rm 'app_data/cli/commands/*.yml' 2>/dev/null || true
21-
go run ./cmd/docs --app_data-path docs/app_data/cli/commands
22-
git -C docs add 'app_data/cli/commands/*.yml'
33+
git -C $(DOCS_FOLDER) pull
34+
git -C $(DOCS_FOLDER) checkout $(DOCS_BRANCH)
35+
git -C $(DOCS_FOLDER) rm '$(DOCS_GENERATED_PATH)/*.$(DOCS_EXTENSION)' 2>/dev/null || true
36+
go run ./cmd/docs --app_data-path $(DOCS_FOLDER)/$(DOCS_GENERATED_PATH) --target $(VARIATION)
37+
git -C $(DOCS_FOLDER) add '$(DOCS_GENERATED_PATH)/*.$(DOCS_EXTENSION)'
2338

2439
.PHONY: docs-pr
2540
docs-pr: docs-commands-data
2641
ifndef GITHUB_REF
2742
$(error GITHUB_REF is not set)
2843
endif
29-
git -C docs checkout -B feat/cli-'$(GITHUB_REF:refs/tags/v%=%)'
30-
git -C docs commit -m 'feat: update cli commands data for $(GITHUB_REF:refs/tags/v%=%) version' || true
31-
git -C docs push --set-upstream origin feat/cli-'$(GITHUB_REF:refs/tags/v%=%)'
32-
cd docs; gh pr create -f -b "Changelog: https://github.com/algolia/cli/releases/tag/$(GITHUB_REF:refs/tags/v%=%)"
44+
git -C $(DOCS_FOLDER) checkout -B feat/cli-'$(GITHUB_REF:refs/tags/v%=%)'
45+
git -C $(DOCS_FOLDER) commit -m 'feat: update cli commands data for $(GITHUB_REF:refs/tags/v%=%) version' || true
46+
git -C $(DOCS_FOLDER) push --set-upstream origin feat/cli-'$(GITHUB_REF:refs/tags/v%=%)'
47+
cd $(DOCS_FOLDER); gh pr create -f -b "Changelog: https://github.com/algolia/cli/releases/tag/$(GITHUB_REF:refs/tags/%=%)"
3348

3449
## Create a new PR (or update the existing one) to update the API specs
3550
api-specs-pr:
@@ -62,4 +77,4 @@ install:
6277
# Uninstall Algolia CLI
6378
uninstall:
6479
rm ${bindir}/algolia
65-
.PHONY: uninstall
80+
.PHONY: uninstall

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ A command line interface to enable Algolia developers to interact with and confi
44

55
![cli](https://user-images.githubusercontent.com/5702266/153008646-1fd8fbf2-4a4d-4421-b2f2-0886487f3e27.png)
66

7-
**Please note:** the Algolia CLI is in **beta** version and subject to the terms governing Beta Services. Algolia CLI may be subject to change or discontinued, and backwards-incompatible changes might be introduced in future releases.
8-
97
## Documentation
108

119
See the [documentation](https://algolia.com/doc/tools/cli/) for setup and usage instructions.

0 commit comments

Comments
 (0)