Skip to content

Commit

Permalink
chore: rename docs to _docs, tools to _tools (#408)
Browse files Browse the repository at this point in the history
The go toolchain ignores directories starting with `_` and `.` as well
as those named `testdata`. We rename the documentation rool to `_docs`
so that it is not considered as part of the distribution package for the
root module. The same treatment is applied to `tools` for good measure.

Fixes #406
  • Loading branch information
RomainMuller authored Nov 20, 2024
1 parent 49288e7 commit 4623562
Show file tree
Hide file tree
Showing 49 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deps-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Update LICENSE-3rdparty.csv
if: steps.is-tree-dirty.outputs.result == 'true'
run: ./tools/make-licenses.sh
run: ./_tools/make-licenses.sh
env:
TMPDIR: ${{ runner.temp }}

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docsite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:
# Set environment to anything other than "production", as the theme we use adds SRI attributes to all CSS files,
# but datadoghq.dev is behind CloudFlare with auto-minify enabled; which breaks SRI if its minification is not
# identical to hugo's.
run: go -C ./docs run github.com/gohugoio/hugo --minify --enableGitInfo --environment=gh-pages
run: go -C ./_docs run github.com/gohugoio/hugo --minify --enableGitInfo --environment=gh-pages
- name: Upload Artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4
with:
name: site
path: docs/public/
path: _docs/public/
if-no-files-found: error

publish:
Expand All @@ -60,13 +60,13 @@ jobs:
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
with:
name: site
path: docs/public/
path: _docs/public/
- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: docs/public/
path: _docs/public/
- name: Deploy to Github Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
4 changes: 2 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
run: find . -iname go.mod -execdir go mod tidy \;

- name: Refresh LICENSE-3rdparty.csv
run: ./tools/make-licenses.sh
run: ./_tools/make-licenses.sh
env:
TMPDIR: ${{ runner.temp }}

Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
version: v1.60.3
working-directory: _integration-tests
- name: Verify license headers
run: go run tools/headercheck/header_check.go
run: go run ./_tools/headercheck/header_check.go
- name: vet
run: go vet ./...

Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "docs/themes/hextra"]
path = docs/themes/hextra
path = _docs/themes/hextra
url = https://github.com/imfing/hextra.git
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dateFormat = '2006-02-01'

[params.editURL]
enable = true
base = 'https://github.com/DataDog/orchestrion/edit/main/docs/content'
base = 'https://github.com/DataDog/orchestrion/edit/main/_docs/content'

[params.footer]
displayCopyright = true
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tools/make-licenses.sh → _tools/make-licenses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ for GOOS in linux darwin windows; do

OUTFILE="${TMPDIR}/LICENSE-3rdparty.${GOOS}.csv"
echo "Building $(basename "${OUTFILE}")"
GOOS="${GOOS}" "${TMPDIR}/bin/go-licenses" report ./... --ignore "${IGNORE_LIST}" --template ./tools/licenses.tpl > "${OUTFILE}" 2> "${TMPDIR}/errors" || (cat "${TMPDIR}/errors" >&2 && exit -1)
GOOS="${GOOS}" "${TMPDIR}/bin/go-licenses" report ./... --ignore "${IGNORE_LIST}" --template ./_tools/licenses.tpl > "${OUTFILE}" 2> "${TMPDIR}/errors" || (cat "${TMPDIR}/errors" >&2 && exit -1)
LICENSE_FILES+=("${OUTFILE}")
done

go run ./tools/copyrights/merge.go -licenses "${SOURCES}" -output LICENSE-3rdparty.csv "${LICENSE_FILES[@]}"
go run ./_tools/copyrights/merge.go -licenses "${SOURCES}" -output LICENSE-3rdparty.csv "${LICENSE_FILES[@]}"
File renamed without changes.
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ comment:

ignore:
- 'samples/**' # This is sample code for instrumentable things
- 'tools/**' # Repository maintenance tooling
- '_tools/**' # Repository maintenance tooling
- 'internal/injector/aspect/advice/code/dot_ast.proxies.go' # Auto-generated proxy code

coverage:
Expand Down
2 changes: 1 addition & 1 deletion instrument/orchestrion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2023-present Datadog, Inc.
---
# yaml-language-server: $schema=../docs/static/schema.json
# yaml-language-server: $schema=../_docs/static/schema.json
meta:
name: github.com/DataDog/orchestrion/instrument
description: |-
Expand Down
2 changes: 1 addition & 1 deletion internal/injector/builtin/builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
// instrumentations.
package builtin

//go:generate go run ./generator -i=yaml/*.yml -i=yaml/*/*.yml -p=builtin -y=./all.yml -o=./generated.go -d=./generated_deps.go -C=1 -docs=../../../docs/content/docs/built-in/ -schemadocs=../../../docs/content/contributing/aspects/
//go:generate go run ./generator -i=yaml/*.yml -i=yaml/*/*.yml -p=builtin -y=./all.yml -o=./generated.go -d=./generated_deps.go -C=1 -docs=../../../_docs/content/docs/built-in/ -schemadocs=../../../_docs/content/contributing/aspects/
2 changes: 1 addition & 1 deletion internal/injector/builtin/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/injector/builtin/generated_deps.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/injector/builtin/generator/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func validateSchema(data []byte) error {

func init() {
_, thisFile, _, _ := runtime.Caller(0)
schemaFile := filepath.Join(thisFile, "..", "..", "..", "..", "..", "docs", "static", "schema.json")
schemaFile := filepath.Join(thisFile, "..", "..", "..", "..", "..", "_docs", "static", "schema.json")

file, err := os.Open(schemaFile)
if err != nil {
Expand Down

0 comments on commit 4623562

Please sign in to comment.