Skip to content

Commit

Permalink
fix(version): use DOTFILES_VERSION data for configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
entelecheia committed May 9, 2023
1 parent a8e6cac commit 51d410f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions chezmoi/.chezmoi.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@
# {{- $github_clones = .github.clones -}}
# {{- end -}}

# {{- $dotfiles_version := or (env "DOTFILES_VERSION") "" -}}
# {{- writeToStdout "---\n" -}}
# {{- writeToStdout (printf "🤖 DOTFILES CONFIGURATION (Version: %s)\n" $dotfiles_version) -}}
# {{- writeToStdout "🖥️ Information found in your system environment variables:\n\n" -}}
# {{- writeToStdout (printf "👤 USER_FULLNAME: %s\n" $name) -}}
# {{- writeToStdout (printf "📧 USER_EMAIL: %s\n" $email) -}}
Expand Down
1 change: 1 addition & 0 deletions chezmoi/.chezmoidata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DOTFILES_VERSION: 0.8.7
1 change: 0 additions & 1 deletion chezmoi/dot_config/chezmoi/dot_version

This file was deleted.

1 change: 1 addition & 0 deletions chezmoi/dot_config/shrc/00-dotfiles-export.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ if [ -d "${HOME}/go/packages" ]; then
ensure_path_entry "${GOPATH}/bin"
fi

export DOTFILES_VERSION="{{ .DOTFILES_VERSION }}"
export USER_FULLNAME="{{ .name }}"
export USER_EMAIL="{{ .email }}"
export SYSTEM_HOSTNAME="{{ .system.hostname }}"
Expand Down
1 change: 1 addition & 0 deletions chezmoi/dot_local/bin/executable_dotfiles-update.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ if chezmoi --version &>/dev/null; then
# pass additional arguments to chezmoi apply except for --prerelease or -p flag
chezmoi apply "${@:2}"
fi
export DOTFILES_VERSION="{{ .DOTFILES_VERSION }}"

# update password-store and passage store
pass-pull
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ tag_format = "v$version"
[tool.semantic_release]
branch = "main"
version_toml = "pyproject.toml:tool.poetry.version"
version_pattern = "chezmoi/dot_config/chezmoi/dot_version:VERSION={version}"
version_pattern = "chezmoi/.chezmoidata.yaml:DOTFILES_VERSION: {version}"
version_source = "tag"
commit_version_number = true # required for version_source = "tag"
commit_subject = "chore(release): :rocket: {version} [skip ci]"
Expand Down

0 comments on commit 51d410f

Please sign in to comment.