Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
87cb75f
feat: Extend baseimage (#25)
NautiluX Oct 9, 2025
8324c7c
feat: List api key (#30)
OliverTrautvetter Oct 10, 2025
03d4143
feat: Extend api key (#29)
OliverTrautvetter Oct 10, 2025
b12a088
docs: Describe service root command, update README (#32)
NautiluX Oct 10, 2025
99a6f9f
feat(docs): Add workflow to automate docs and license generation
OliverTrautvetter Oct 14, 2025
521d4e0
feat(docs): Add workflow to automate docs and license generation
OliverTrautvetter Oct 14, 2025
389ddd1
fix: try to make it less weird
OliverTrautvetter Oct 14, 2025
ba1294a
fix: add go to workflow to update license
OliverTrautvetter Oct 14, 2025
16d13cf
chore(docs): Auto-update docs and licenses
github-actions[bot] Oct 14, 2025
a512f99
fix: update and simplify workflow for docs and licenses generation
OliverTrautvetter Oct 14, 2025
6920318
fix: maybe fix workflow
OliverTrautvetter Oct 14, 2025
796d99e
chore(docs): Auto-update docs and licenses
OliverTrautvetter Oct 14, 2025
4756e49
chore(docs): Auto-update docs and licenses
OliverTrautvetter Oct 14, 2025
5cd17df
fix: minor change to check workflow trigger
OliverTrautvetter Oct 14, 2025
cc204d1
Merge branch 'main' into automate_docs_and_license
OliverTrautvetter Oct 14, 2025
d40723a
chore(docs): Auto-update docs and licenses
OliverTrautvetter Oct 14, 2025
26bb384
Merge branch 'main' into automate_docs_and_license
OliverTrautvetter Oct 15, 2025
642cbc1
chore(docs): Auto-update docs and licenses
OliverTrautvetter Oct 15, 2025
e3e47e8
fix: prevent temp path in docs
OliverTrautvetter Oct 16, 2025
1c62324
chore(docs): Auto-update docs and licenses
OliverTrautvetter Oct 16, 2025
706ab85
refactor: simplify update-docs-and-licenses script
OliverTrautvetter Oct 16, 2025
6902939
Merge branch 'automate_docs_and_license' of https://github.com/codesp…
OliverTrautvetter Oct 16, 2025
0a1030b
chore(docs): Auto-update docs and licenses
OliverTrautvetter Oct 16, 2025
7a0c95e
ci: ignore and untrack internal util testdata fixtures
OliverTrautvetter Oct 16, 2025
07660bb
ci: keep testdata dir, ignore its contents; add .gitkeep
OliverTrautvetter Oct 16, 2025
67aee9f
fix: update .gitignore to ignore specific testdata file and restore r…
OliverTrautvetter Oct 16, 2025
6806147
fix: update .gitignore to ignore internal util testdata directory and…
OliverTrautvetter Oct 16, 2025
51d0bad
fix: update embed directive to reference specific tar.gz file instead…
OliverTrautvetter Oct 16, 2025
6590378
fix: refactor tar_test to create in-memory tar.gz instead of using em…
OliverTrautvetter Oct 16, 2025
a010fc5
Merge branch 'main' into automate_docs_and_license
OliverTrautvetter Oct 16, 2025
6e903c4
chore(docs): Auto-update docs and licenses
OliverTrautvetter Oct 16, 2025
684deab
fix: update main binary name to 'oms-cli' and simplify update script
OliverTrautvetter Oct 17, 2025
349b4fe
chore(docs): Auto-update docs and licenses
OliverTrautvetter Oct 17, 2025
c4f4fb8
Merge branch 'main' into automate_docs_and_license
OliverTrautvetter Oct 17, 2025
b4032fb
chore(docs): Auto-update docs and licenses
OliverTrautvetter Oct 17, 2025
9930190
fix: improve command example formatting and ensure stable binary name…
OliverTrautvetter Oct 17, 2025
89d0c08
fix: update command name in documentation generation to ensure consis…
OliverTrautvetter Oct 17, 2025
5edc3a9
chore(docs): Auto-update docs and licenses
OliverTrautvetter Oct 17, 2025
a9c9bd9
Merge branch 'main' into automate_docs_and_license
OliverTrautvetter Oct 23, 2025
fbd851c
chore(docs): Auto-update docs and licenses
OliverTrautvetter Oct 23, 2025
c177147
fix: update logging method in WriteCounter to ensure progress message…
OliverTrautvetter Oct 23, 2025
7d04c75
fix: handle error when logging progress in WriteCounter
OliverTrautvetter Oct 23, 2025
0cb1759
fix: remove unnecessary directory change in update-docs-and-licenses …
OliverTrautvetter Oct 23, 2025
356a167
fix: update documentation generation to use oms-cli.md for README
OliverTrautvetter Oct 23, 2025
7d16506
chore(docs): Auto-update docs and licenses
OliverTrautvetter Oct 23, 2025
401c180
Merge branch 'main' into automate_docs_and_license
OliverTrautvetter Oct 23, 2025
1a48a9d
chore(docs): Auto-update docs and licenses
OliverTrautvetter Oct 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/cli-build_test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Codesphere Inc.
# SPDX-License-Identifier: Apache-2.0

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/go-lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Codesphere Inc.
# SPDX-License-Identifier: Apache-2.0

name: golangci-lint
on:
push:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/service-build_test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Codesphere Inc.
# SPDX-License-Identifier: Apache-2.0

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) Codesphere Inc.
# SPDX-License-Identifier: Apache-2.0

name: Tag

on:
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/update-docs-and-licenses.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright (c) Codesphere Inc.
# SPDX-License-Identifier: Apache-2.0

name: 'Auto-Update Docs & Licenses'

permissions:
contents: write

on:
pull_request:
types: [opened, synchronize]

jobs:
update-files:
# skip runs triggered by the bot's own commit to avoid loops
if: github.actor != 'github-actions[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
# on push to main, use main; on PR, check out the PR head
ref: ${{ github.event.pull_request.head.ref || github.ref }}

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.2'

- name: Update docs & licenses
run: |
./hack/update-docs-and-licenses.sh

- name: Commit and push auto-generated changes
uses: EndBug/add-and-commit@v9
with:
# Use the PR author's identity for the commit
author_name: ${{ github.event.pull_request.user.login }}
author_email: ${{ github.event.pull_request.user.id }}+${{ github.event.pull_request.user.login }}@users.noreply.github.com

# Commit message
message: 'chore(docs): Auto-update docs and licenses'

# Adds a sign-off to the commit message for DCO
commit: '--signoff'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ oms-cli
oms-service
dist/
oms-workdir/

# Ignore internal util testdata fixtures
internal/util/testdata/
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ docs:
rm -rf docs
mkdir docs
go run -ldflags="-X 'github.com/codesphere-cloud/oms/internal/version.binName=oms-cli'" hack/gendocs/main.go
cp docs/oms.md docs/README.md
cp docs/oms-cli.md docs/README.md

generate-license: generate
go-licenses report --template .NOTICE.template ./... > NOTICE
Expand Down
86 changes: 64 additions & 22 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,48 @@ Version: v3.5.1
License: MIT
License URL: https://github.com/blang/semver/blob/v3.5.1/LICENSE

----------
Module: github.com/clipperhouse/uax29/v2
Version: v2.2.0
License: MIT
License URL: https://github.com/clipperhouse/uax29/blob/v2.2.0/LICENSE

----------
Module: github.com/codesphere-cloud/cs-go/pkg/io
Version: v0.10.1
Version: v0.13.0
License: Apache-2.0
License URL: https://github.com/codesphere-cloud/cs-go/blob/v0.10.1/LICENSE
License URL: https://github.com/codesphere-cloud/cs-go/blob/v0.13.0/LICENSE

----------
Module: github.com/codesphere-cloud/oms/internal/tmpl
Version: Unknown
License: Apache-2.0
License URL: https://github.com/codesphere-cloud/oms/blob/HEAD/internal/tmpl/LICENSE

----------
Module: github.com/cpuguy83/go-md2man/v2/md2man
Version: v2.0.6
Version: v2.0.7
License: MIT
License URL: https://github.com/cpuguy83/go-md2man/blob/v2.0.6/LICENSE.md
License URL: https://github.com/cpuguy83/go-md2man/blob/v2.0.7/LICENSE.md

----------
Module: github.com/davecgh/go-spew/spew
Version: v1.1.2-0.20180830191138-d8f796af33cc
License: ISC
License URL: https://github.com/davecgh/go-spew/blob/d8f796af33cc/LICENSE

----------
Module: github.com/google/go-github/v30/github
Version: v30.1.0
License: BSD-3-Clause
License URL: https://github.com/google/go-github/blob/v30.1.0/LICENSE

----------
Module: github.com/google/go-querystring/query
Version: v1.1.0
License: BSD-3-Clause
License URL: https://github.com/google/go-querystring/blob/v1.1.0/LICENSE

----------
Module: github.com/inconshreveable/go-update
Version: v0.0.0-20160112193335-8152e7eb6ccf
Expand All @@ -47,15 +71,15 @@ License URL: https://github.com/inconshreveable/go-update/blob/8152e7eb6ccf/inte

----------
Module: github.com/jedib0t/go-pretty/v6
Version: v6.6.7
Version: v6.6.8
License: MIT
License URL: https://github.com/jedib0t/go-pretty/blob/v6.6.7/LICENSE
License URL: https://github.com/jedib0t/go-pretty/blob/v6.6.8/LICENSE

----------
Module: github.com/mattn/go-runewidth
Version: v0.0.16
Version: v0.0.19
License: MIT
License URL: https://github.com/mattn/go-runewidth/blob/v0.0.16/LICENSE
License URL: https://github.com/mattn/go-runewidth/blob/v0.0.19/LICENSE

----------
Module: github.com/pmezard/go-difflib/difflib
Expand All @@ -64,10 +88,10 @@ License: BSD-3-Clause
License URL: https://github.com/pmezard/go-difflib/blob/5d4384ee4fb2/LICENSE

----------
Module: github.com/rivo/uniseg
Version: v0.4.7
Module: github.com/rhysd/go-github-selfupdate/selfupdate
Version: v1.2.3
License: MIT
License URL: https://github.com/rivo/uniseg/blob/v0.4.7/LICENSE.txt
License URL: https://github.com/rhysd/go-github-selfupdate/blob/v1.2.3/LICENSE

----------
Module: github.com/russross/blackfriday/v2
Expand All @@ -77,15 +101,15 @@ License URL: https://github.com/russross/blackfriday/blob/v2.1.0/LICENSE.txt

----------
Module: github.com/spf13/cobra
Version: v1.9.1
Version: v1.10.1
License: Apache-2.0
License URL: https://github.com/spf13/cobra/blob/v1.9.1/LICENSE.txt
License URL: https://github.com/spf13/cobra/blob/v1.10.1/LICENSE.txt

----------
Module: github.com/spf13/pflag
Version: v1.0.6
Version: v1.0.10
License: BSD-3-Clause
License URL: https://github.com/spf13/pflag/blob/v1.0.6/LICENSE
License URL: https://github.com/spf13/pflag/blob/v1.0.10/LICENSE

----------
Module: github.com/stretchr/objx
Expand All @@ -95,21 +119,39 @@ License URL: https://github.com/stretchr/objx/blob/v0.5.2/LICENSE

----------
Module: github.com/stretchr/testify
Version: v1.10.0
Version: v1.11.1
License: MIT
License URL: https://github.com/stretchr/testify/blob/v1.10.0/LICENSE
License URL: https://github.com/stretchr/testify/blob/v1.11.1/LICENSE

----------
Module: github.com/tcnksm/go-gitconfig
Version: v0.1.2
License: MIT
License URL: https://github.com/tcnksm/go-gitconfig/blob/v0.1.2/LICENSE

----------
Module: github.com/ulikunitz/xz
Version: v0.5.15
License: BSD-3-Clause
License URL: https://github.com/ulikunitz/xz/blob/v0.5.15/LICENSE

----------
Module: golang.org/x/crypto
Version: v0.42.0
License: BSD-3-Clause
License URL: https://cs.opensource.google/go/x/crypto/+/v0.42.0:LICENSE

----------
Module: golang.org/x/sync/errgroup
Version: v0.16.0
Module: golang.org/x/oauth2
Version: v0.30.0
License: BSD-3-Clause
License URL: https://cs.opensource.google/go/x/sync/+/v0.16.0:LICENSE
License URL: https://cs.opensource.google/go/x/oauth2/+/v0.30.0:LICENSE

----------
Module: golang.org/x/text
Version: v0.28.0
Version: v0.29.0
License: BSD-3-Clause
License URL: https://cs.opensource.google/go/x/text/+/v0.28.0:LICENSE
License URL: https://cs.opensource.google/go/x/text/+/v0.29.0:LICENSE

----------
Module: gopkg.in/yaml.v3
Expand Down
4 changes: 2 additions & 2 deletions cli/cmd/download_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ func AddDownloadPackageCmd(download *cobra.Command, opts GlobalOptions) {
Short: "Download a codesphere package",
Long: io.Long(`Download a specific version of a Codesphere package
To list available packages, run oms list packages.`),
Example: io.FormatExampleCommands("download package", []io.Example{
Example: formatExamplesWithBinary("download package", []io.Example{
{Cmd: "--version codesphere-v1.55.0", Desc: "Download Codesphere version 1.55.0"},
{Cmd: "--version codesphere-v1.55.0 --file installer-lite.tar.gz", Desc: "Download lite package of Codesphere version 1.55.0"},
}),
}, "oms-cli"),
},
FileWriter: util.NewFilesystemWriter(),
}
Expand Down
36 changes: 36 additions & 0 deletions cli/cmd/example_helpers.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright (c) Codesphere Inc.
// SPDX-License-Identifier: Apache-2.0

package cmd

import (
"strings"

"github.com/codesphere-cloud/cs-go/pkg/io"
)

// formatExamplesWithBinary builds an Example string similar to io.FormatExampleCommands
// but prefixes commands with a stable binary name (e.g. "oms-cli") instead of temporary go-build paths
func formatExamplesWithBinary(cmdName string, examples []io.Example, binaryName string) string {
var b strings.Builder
for i, ex := range examples {
if ex.Desc != "" {
b.WriteString("# ")
b.WriteString(ex.Desc)
b.WriteString("\n")
}
b.WriteString("$ ")
b.WriteString(binaryName)
b.WriteString(" ")
b.WriteString(cmdName)
if ex.Cmd != "" {
b.WriteString(" ")
b.WriteString(ex.Cmd)
}
b.WriteString("\n")
if i < len(examples)-1 {
b.WriteString("\n")
}
}
return b.String()
}
21 changes: 13 additions & 8 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## oms
## oms-cli

Codesphere Operations Management System (OMS)

Expand All @@ -12,14 +12,19 @@ like downloading new versions.
### Options

```
-h, --help help for oms
-h, --help help for oms-cli
```

### SEE ALSO

* [oms download](oms_download.md) - Download resources available through OMS
* [oms list](oms_list.md) - List resources available through OMS
* [oms update](oms_update.md) - Update Codesphere OMS
* [oms version](oms_version.md) - Print version

###### Auto generated by spf13/cobra on 19-Sep-2025
* [oms-cli beta](oms-cli_beta.md) - Commands for early testing
* [oms-cli download](oms-cli_download.md) - Download resources available through OMS
* [oms-cli install](oms-cli_install.md) - Coming soon: Install Codesphere and other components
* [oms-cli licenses](oms-cli_licenses.md) - Print license information
* [oms-cli list](oms-cli_list.md) - List resources available through OMS
* [oms-cli register](oms-cli_register.md) - Register a new API key
* [oms-cli revoke](oms-cli_revoke.md) - Revoke resources available through OMS
* [oms-cli update](oms-cli_update.md) - Update OMS related resources
* [oms-cli version](oms-cli_version.md) - Print version

###### Auto generated by spf13/cobra on 23-Oct-2025
30 changes: 30 additions & 0 deletions docs/oms-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## oms-cli

Codesphere Operations Management System (OMS)

### Synopsis

Codesphere Operations Management System (OMS)

This command can be used to run common tasks related to managing codesphere installations,
like downloading new versions.

### Options

```
-h, --help help for oms-cli
```

### SEE ALSO

* [oms-cli beta](oms-cli_beta.md) - Commands for early testing
* [oms-cli download](oms-cli_download.md) - Download resources available through OMS
* [oms-cli install](oms-cli_install.md) - Coming soon: Install Codesphere and other components
* [oms-cli licenses](oms-cli_licenses.md) - Print license information
* [oms-cli list](oms-cli_list.md) - List resources available through OMS
* [oms-cli register](oms-cli_register.md) - Register a new API key
* [oms-cli revoke](oms-cli_revoke.md) - Revoke resources available through OMS
* [oms-cli update](oms-cli_update.md) - Update OMS related resources
* [oms-cli version](oms-cli_version.md) - Print version

###### Auto generated by spf13/cobra on 23-Oct-2025
21 changes: 21 additions & 0 deletions docs/oms-cli_beta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## oms-cli beta

Commands for early testing

### Synopsis

OMS CLI commands for early adoption and testing.
Be aware that that usage and behavior may change as the features are developed.

### Options

```
-h, --help help for beta
```

### SEE ALSO

* [oms-cli](oms-cli.md) - Codesphere Operations Management System (OMS)
* [oms-cli beta extend](oms-cli_beta_extend.md) - Extend Codesphere ressources such as base images.

###### Auto generated by spf13/cobra on 23-Oct-2025
Loading