Skip to content

Commit 358a009

Browse files
committed
Refactor version declaration and update init command description
- Changed the version variable declaration to a block format for clarity. - Enhanced the 'init' command description to specify the installation of Docker, Helm, Kind, and kubectl along with Helm configuration for Netsocs.
1 parent 5192d62 commit 358a009

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,23 @@ jobs:
2424
echo "Extracted version: $VERSION"
2525
echo "version=$VERSION" >> $GITHUB_OUTPUT
2626
27-
- name: Build CLI with version
28-
run: |
29-
# Asume que tu main.go está en el directorio cmd/cli
30-
go build -ldflags="-X 'main.Version=${{ steps.version.outputs.version }}'" -o netsocs .
27+
# - name: Build CLI with version
28+
# run: |
29+
# # Asume que tu main.go está en el directorio cmd/cli
30+
# go build -ldflags="-X 'main.Version=${{ steps.version.outputs.version }}'" -o netsocs .
31+
32+
- name: Build and Push CLI
33+
uses: docker/build-push-action@v5
34+
with:
35+
context: cli
36+
platforms: linux/amd64
37+
provenance: false
38+
push: false
39+
tags: |
40+
${{ env.REGISTRY }}/netsocs-team/${{ env.IMAGE_NAME }}/cli:${{ steps.branch.outputs.branch }}
41+
${{ env.REGISTRY }}/netsocs-team/${{ env.IMAGE_NAME }}/cli:${{ github.sha }}
42+
build-args: |
43+
VERSION=${{ steps.version.outputs.version }}
3144
3245
- name: Create Release
3346
uses: softprops/action-gh-release@v1

main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ import (
1616
"github.com/spf13/cobra"
1717
)
1818

19-
var version = "v0.0.0"
19+
var (
20+
version = "v0.0.0"
21+
)
2022

2123
var rootCmd = &cobra.Command{
2224
Use: "netsocs-manager-cli",
@@ -30,7 +32,7 @@ type ChartValues struct {
3032

3133
var initCmd = &cobra.Command{
3234
Use: "init",
33-
Short: "Initializes Helm configuration for Netsocs",
35+
Short: "Installs Docker, Helm, Kind, kubectl and initializes Helm configuration for Netsocs",
3436
Run: commandinit.InitCommand,
3537
}
3638

0 commit comments

Comments
 (0)