Skip to content

Commit

Permalink
Fixing set-session bug (#21)
Browse files Browse the repository at this point in the history
* process docker images after nuget publish job

* bugfix release to fix session pre-filter bug
  • Loading branch information
reubenmiller authored Sep 29, 2020
1 parent a236a74 commit 9c165c7
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:

publish-docker-latest:
runs-on: ubuntu-latest
needs: [publish-nuget]
if: "true"
env:
CR_PAT: ${{ secrets.CR_PAT }}
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

## Released

### v1.4.1

#### Bug fixes

* `set-session`: Fixed bug when setting a session when using the pre-filter which resulted in the wrong session being activated

### v1.4.0

#### PSc8y (PowerShell)
Expand Down
3 changes: 2 additions & 1 deletion docker/pwsh.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM mcr.microsoft.com/powershell
ENV C8Y_SESSION_HOME=/sessions
VOLUME [ "/sessions" ]

RUN pwsh -c "Install-Module PSc8y -Repository PSGallery -AllowClobber -Force"
RUN pwsh -c "Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted; " \
&& pwsh -c "Install-Module PSc8y -Repository PSGallery -AllowClobber -Force"

ENTRYPOINT [ "pwsh", "-NoExit", "-c", "Import-Module PSc8y" ]
4 changes: 2 additions & 2 deletions docs/_docs/1-bash-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ To make the installation and future updates easier, a script is provided in the
**Install a specific version**

```sh
c8y-update v1.4.0
c8y-update v1.4.1
```

The list of versions is available from the [github release page](https://github.com/reubenmiller/go-c8y-cli/releases)
Expand Down Expand Up @@ -183,7 +183,7 @@ However if you don't install the `c8y.profile.sh` script or the zsh `c8y` plugin

```plaintext
Cumulocity command line tool
v1.4.0 -- HEAD
v1.4.1 -- HEAD
```

1. Add completions to your profile:
Expand Down
4 changes: 2 additions & 2 deletions docs/_docs/1-docker-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ If you have already activated a c8y session on a command console, you can re-use

You have to execute a docker pull if you want to re-check if there is a newer image available (i.e. also tagged with latest).

You can also specify the version that you want to try out by replacing `latest` with the version number, i.e. `1.4.0`.
You can also specify the version that you want to try out by replacing `latest` with the version number, i.e. `1.4.1`.

```sh
# update to the latest image
docker pull ghcr.io/reubenmiller/c8y-zsh:latest
# use a known version
docker pull ghcr.io/reubenmiller/c8y-zsh:1.4.0
docker pull ghcr.io/reubenmiller/c8y-zsh:1.4.1
```
4 changes: 2 additions & 2 deletions pkg/cmd/listSessionCmd.manual.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ func (n *listSessionCmd) listSession(cmd *cobra.Command, args []string) error {
return nil
}

if idx >= 0 && idx < len(config.Sessions) {
fmt.Printf("%s", config.Sessions[idx].Path)
if idx >= 0 && idx < len(filteredSessions) {
fmt.Printf("%s", filteredSessions[idx].Path)
} else {
fmt.Println("")
}
Expand Down
2 changes: 1 addition & 1 deletion tools/PSc8y/PSc8y.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = './PSc8y.psm1'

# Version number of this module.
ModuleVersion = '1.4.0'
ModuleVersion = '1.4.1'

# Supported PSEditions
CompatiblePSEditions = @(
Expand Down

0 comments on commit 9c165c7

Please sign in to comment.