Skip to content

Commit

Permalink
docs(release): require to follow semantic versioning
Browse files Browse the repository at this point in the history
closes #322
  • Loading branch information
edouard-lopez committed Aug 2, 2023
1 parent 8de462d commit 85ed816
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 20 deletions.
20 changes: 11 additions & 9 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@ Release process is automated in the pipeline with the following steps.
## Test

We run the test workflow on:

* Pull Request changing
* any `**.fish` ;
* and workflow (`*.yml`) files ;
* on `master` branch changing
* `**.fish` files with the exception `conf.d/pure.fish`, as we have dedicated mechanism to manage versions bump ;
* and workflow (`*.yml`) files
* any `**.fish` ;
* and workflow (`*.yml`) files ;
* on `master` branch changing
* `**.fish` files with the exception `conf.d/pure.fish`, as we have dedicated mechanism to manage versions bump ;
* and workflow (`*.yml`) files

## Bumping version

**required:** You MUST **follow semantic versioning** based on [conventional commits][coco].

Is triggered only on `master` and:

1. We compute the [project's next version][next-version] using a GitHub Action ;
1. Then update `$pure_version` value in `./conf.d/pure.fish` ;
1. Finally commit and [push the change][push] to the repo.
2. Then update `$pure_version` value in `./conf.d/pure.fish` ;
3. Finally commit and [push the change][push] to the repo.

## Adding new tag

The `add-version-tag.yml` pipeline is triggered only for `master` when `./conf.d/pure.fish` is changed and add a tagged based on `$pure_version`.


[next-version]: https://github.com/thenativeweb/get-next-version
[push]: https://github.com/ad-m/github-push-action
[push]: https://github.com/ad-m/github-push-action
8 changes: 7 additions & 1 deletion conf.d/pure.fish
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ _pure_set_default pure_color_jobs pure_color_normal
_pure_set_default pure_show_system_time false
_pure_set_default pure_color_system_time pure_color_mute

# Virtualenv for Python
# env for Python
_pure_set_default pure_color_virtualenv pure_color_mute

# Print current working directory at the beginning of prompt
Expand Down Expand Up @@ -91,3 +91,9 @@ _pure_set_default pure_symbol_container_prefix "" # suggestion: '🐋' or '📦'

# Detect when running in SSH
_pure_set_default pure_symbol_ssh_prefix "" # suggestion: 'ssh:/' or '🔗🔐🔒🌐'

# Display Kubernetes/k8s context and namespace
_pure_set_default pure_enable_k8s false
_pure_set_default pure_symbol_k8s_prefix "" # ☸️
_pure_set_default pure_color_k8s_context pure_color_success
_pure_set_default pure_color_k8s_namespace pure_color_primary
3 changes: 3 additions & 0 deletions functions/_pure_k8s_context.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function _pure_k8s_context
echo (kubectl config current-context)
end
3 changes: 3 additions & 0 deletions functions/_pure_k8s_namespace.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function _pure_k8s_namespace
echo (kubectl config view --minify --output 'jsonpath={..namespace}')
end
24 changes: 14 additions & 10 deletions functions/_pure_prompt_first_line.fish
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ function _pure_prompt_first_line \

set --local prompt_ssh (_pure_prompt_ssh)
set --local prompt_container (_pure_prompt_container)
set --local prompt_k8s (_pure_prompt_k8s)
set --local prompt_git (_pure_prompt_git)
set --local prompt_command_duration (_pure_prompt_command_duration)
set --local prompt (_pure_print_prompt \
$prompt_ssh \
$prompt_container \
$prompt_k8s \
$prompt_git \
$prompt_command_duration
)
Expand All @@ -19,18 +21,20 @@ function _pure_prompt_first_line \
set --local prompt_components
if set --query pure_begin_prompt_with_current_directory; and test "$pure_begin_prompt_with_current_directory" = true
set prompt_components \
$current_folder \
$prompt_git \
$prompt_ssh \
$prompt_container \
$prompt_command_duration
$current_folder \
$prompt_git \
$prompt_ssh \
$prompt_container \
$prompt_k8s \
$prompt_command_duration
else
set prompt_components \
$prompt_ssh \
$prompt_container \
$current_folder \
$prompt_git \
$prompt_command_duration
$prompt_ssh \
$prompt_container \
$prompt_k8s \
$current_folder \
$prompt_git \
$prompt_command_duration
end

echo (_pure_print_prompt $prompt_components)
Expand Down
7 changes: 7 additions & 0 deletions functions/_pure_prompt_k8s.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function _pure_prompt_k8s
if $pure_enable_k8s
set -l context (_pure_set_color $pure_color_k8s_context)(_pure_k8s_context)
set -l namespace (_pure_set_color $pure_color_k8s_namespace)(_pure_k8s_namespace)
echo "$pure_symbol_k8s_prefix $context/$namespace"
end
end
Empty file.
Empty file.

0 comments on commit 85ed816

Please sign in to comment.