Skip to content

Commit

Permalink
Add hover text for truncated version number
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuru committed Jan 24, 2024
1 parent 6afb228 commit d6bdc0c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ terraform-0.13 \[frozen\] | 0.13.7 | Terraform is a tool for building, chang
[![terraform-0.14](https://github.com/cloudposse/packages/actions/workflows/terraform-0.14.yml/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Aterraform-0.14) | 0.14.11 | Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.
[![terraform-0.15](https://github.com/cloudposse/packages/actions/workflows/terraform-0.15.yml/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Aterraform-0.15) | 0.15.5 | Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.
[![terraform-1](https://github.com/cloudposse/packages/actions/workflows/terraform-1.yml/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Aterraform-1) | 1.7.0 | Terraform enables you to safely and predictably create, change, and improve infrastructure.
[![terraform-config-inspect](https://github.com/cloudposse/packages/actions/workflows/terraform-config-inspect.yml/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Aterraform-config-inspect) | 0.0.20231… | A helper library for shallow inspection of Terraform configurations
[![terraform-config-inspect](https://github.com/cloudposse/packages/actions/workflows/terraform-config-inspect.yml/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Aterraform-config-inspect) | [0.0.20231…](## "0.0.20231204233900+gita34142ec2a72") | A helper library for shallow inspection of Terraform configurations
[![terraform-docs](https://github.com/cloudposse/packages/actions/workflows/terraform-docs.yml/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Aterraform-docs) | 0.17.0 | Generate docs from terraform modules
[![terraform-module-versions](https://github.com/cloudposse/packages/actions/workflows/terraform-module-versions.yml/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Aterraform-module-versions) | 3.1.13 | CLI tool that checks Terraform code for module updates. Single binary, no dependencies. linux, osx, windows.
terraform_0.11 \[frozen\] | 0.11.15 | Terraform (Deprecated package. Use terraform-0.11 instead)
Expand Down
2 changes: 1 addition & 1 deletion docs/badges.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ terraform-0.13 \[frozen\] | 0.13.7 | Terraform is a tool for building, chang
[![terraform-0.14](https://github.com/cloudposse/packages/actions/workflows/terraform-0.14.yml/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Aterraform-0.14) | 0.14.11 | Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.
[![terraform-0.15](https://github.com/cloudposse/packages/actions/workflows/terraform-0.15.yml/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Aterraform-0.15) | 0.15.5 | Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.
[![terraform-1](https://github.com/cloudposse/packages/actions/workflows/terraform-1.yml/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Aterraform-1) | 1.7.0 | Terraform enables you to safely and predictably create, change, and improve infrastructure.
[![terraform-config-inspect](https://github.com/cloudposse/packages/actions/workflows/terraform-config-inspect.yml/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Aterraform-config-inspect) | 0.0.20231… | A helper library for shallow inspection of Terraform configurations
[![terraform-config-inspect](https://github.com/cloudposse/packages/actions/workflows/terraform-config-inspect.yml/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Aterraform-config-inspect) | [0.0.20231…](## "0.0.20231204233900+gita34142ec2a72") | A helper library for shallow inspection of Terraform configurations
[![terraform-docs](https://github.com/cloudposse/packages/actions/workflows/terraform-docs.yml/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Aterraform-docs) | 0.17.0 | Generate docs from terraform modules
[![terraform-module-versions](https://github.com/cloudposse/packages/actions/workflows/terraform-module-versions.yml/badge.svg?branch=master)](https://github.com/cloudposse/packages/actions?query=workflow%3Aterraform-module-versions) | 3.1.13 | CLI tool that checks Terraform code for module updates. Single binary, no dependencies. linux, osx, windows.
terraform_0.11 \[frozen\] | 0.11.15 | Terraform (Deprecated package. Use terraform-0.11 instead)
Expand Down
4 changes: 3 additions & 1 deletion tasks/Makefile.package
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,15 @@ info/short:
fi

# info/md is used to make docs/badges.md
# We truncate long versions to 9 characters to avoid making the version column too wide.
# We use GitHub-flavored Markdown special format [text](## "hover text") to make the truncated version accessible via hover.
info/md:
@if [[ $${PACKAGE_ENABLED:-true} != "false" ]]; then \
if [[ "$(PACKAGE_ARCHS_DISABLED)" != "" ]] && ! [[ "$(PACKAGE_ARCHS_DISABLED)" =~ "no-linux" ]]; then \
package_arch_incomplete='*'; \
fi; \
if (( $${#PACKAGE_VERSION} > 9 )); then \
truncated_version='%-9.9s…'; \
truncated_version='[%-9.9s…](## "$(subst %,,$(subst ',,$(subst ",,$(PACKAGE_VERSION))))")'; \
else \
truncated_version='%-10s'; \
fi; \
Expand Down

0 comments on commit d6bdc0c

Please sign in to comment.