Skip to content

Commit

Permalink
feat: add license URL
Browse files Browse the repository at this point in the history
  • Loading branch information
virtualroot committed Jan 11, 2025
1 parent 5a6055b commit 052775b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.hugo_build.lock
public/
# go binary
main
2 changes: 2 additions & 0 deletions data/tools.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"opentofu": {
"license": "MPL-2.0",
"licenseURL": "https://github.com/opentofu/opentofu/blob/main/LICENSE",
"registry": "https://search.opentofu.org/",
"features": [
{
Expand Down Expand Up @@ -56,6 +57,7 @@
},
"terraform": {
"license": "BUSL-1.1",
"licenseURL": "https://github.com/hashicorp/terraform/blob/main/LICENSE",
"registry": "https://registry.terraform.io/",
"features": [
{
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1><a href="https://cani.tf/">Can I TF</a></h1>
<tr>
<td>License</td>
{{ range $toolName, $toolData := .Site.Data.tools }}
<td>{{ $toolData.license }}</td>
<td><a href="{{ $toolData.licenseURL }}">{{ $toolData.license }}</a></td>
{{- end }}
</tr>
{{- /* Loop through Registry */ -}}
Expand Down
8 changes: 7 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ var schemaData = []byte(`{
"license": {
"type": "string"
},
"licenseURL": {
"type": "string",
"format": "uri"
},
"registry": {
"type": "string",
"format": "uri"
Expand Down Expand Up @@ -57,6 +61,7 @@ var schemaData = []byte(`{
var tools = []byte(`{
"opentofu": {
"license": "MPL-2.0",
"licenseURL": "https://github.com/opentofu/opentofu/blob/main/LICENSE",
"registry": "https://search.opentofu.org/",
"features": [
{
Expand Down Expand Up @@ -112,6 +117,7 @@ var tools = []byte(`{
},
"terraform": {
"license": "BUSL-1.1",
"licenseURL": "https://github.com/hashicorp/terraform/blob/main/LICENSE",
"registry": "https://registry.terraform.io/",
"features": [
{
Expand All @@ -137,7 +143,7 @@ var tools = []byte(`{
"version": "1.7"
},
{
"name": "Stacks",
"name": "Stacks*",
"version": "1.9",
"url": "https://developer.hashicorp.com/terraform/language/stacks"
},
Expand Down
4 changes: 3 additions & 1 deletion static/tools.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"opentofu": {
"license": "MPL-2.0",
"licenseURL": "https://github.com/opentofu/opentofu/blob/main/LICENSE",
"registry": "https://search.opentofu.org/",
"features": [
{
Expand Down Expand Up @@ -56,6 +57,7 @@
},
"terraform": {
"license": "BUSL-1.1",
"licenseURL": "https://github.com/hashicorp/terraform/blob/main/LICENSE",
"registry": "https://registry.terraform.io/",
"features": [
{
Expand All @@ -81,7 +83,7 @@
"version": "1.7"
},
{
"name": "Stacks",
"name": "Stacks*",
"version": "1.9",
"url": "https://developer.hashicorp.com/terraform/language/stacks"
},
Expand Down

0 comments on commit 052775b

Please sign in to comment.