diff --git a/LICENSE b/LICENSE index c46b0ca..ec2045e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2020 John Olheiser +Copyright (c) 2022 John Olheiser Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 4b65cbd..a1b3f55 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# tmpl templates +# goreleaser -Check out the various branches for some basic examples of templates. +A template to generate `goreleaser` config and accompanying Woodpecker pipeline. ## License diff --git a/template.toml b/template.toml deleted file mode 100644 index 4e2ac7e..0000000 --- a/template.toml +++ /dev/null @@ -1,18 +0,0 @@ -[gitea_url] -default = "https://git.jojodev.com" - -[gitea_user] - -[gitea_repo] - -[name] -default = "${TMPL_PROMPT_GITEA_REPO}" -depends_on = ["gitea_repo"] - -[module] -default = "${TMPL_PROMPT_GITEA_URL}/${TMPL_PROMPT_GITEA_USER}/${TMPL_PROMPT_GITEA_REPO}" -depends_on = ["gitea_url", "gitea_user", "gitea_repo"] - -[version_package] -default = "${TMPL_PROMPT_MODULE}/cmd" -depends_on = ["module"] \ No newline at end of file diff --git a/template/.goreleaser.yaml b/template/.goreleaser.yaml index 83121c6..8dbbf9d 100644 --- a/template/.goreleaser.yaml +++ b/template/.goreleaser.yaml @@ -18,8 +18,8 @@ checksum: name_template: 'checksums.txt' release: gitea: - owner: jolheiser + owner: {{gitea_user}} name: {{gitea_repo}} gitea_urls: - api: {{gitea_url}}/api/v1/ - download: {{gitea_url}} + api: https://{{gitea_url}}/api/v1/ + download: https://{{gitea_url}} diff --git a/template/.woodpecker/goreleaser.yml b/template/.woodpecker/goreleaser.yml index 589d07c..2b4d558 100644 --- a/template/.woodpecker/goreleaser.yml +++ b/template/.woodpecker/goreleaser.yml @@ -32,7 +32,7 @@ pipeline: prune: image: jolheiser/drone-gitea-prune settings: - base: {{gitea_url}} + base: https://{{gitea_url}} token: from_secret: gitea_token when: diff --git a/tmpl.yaml b/tmpl.yaml new file mode 100644 index 0000000..7f63558 --- /dev/null +++ b/tmpl.yaml @@ -0,0 +1,16 @@ +prompts: + - id: gitea_domain + label: Gitea Domain + default: git.jojodev.com + help: No protocol or trailing slash + - id: gitea_user + label: Gitea User + - id: gitea_repo + label: Gitea Repo + - id: module + label: Module + default: ${TMPL_PROMPT_GITEA_DOMAIN}/${TMPL_PROMPT_GITEA_USER}/${TMPL_PROMPT_GITEA_REPO} + - id: version_package + label: Version Package + help: The package where the `Version` variable is + default: ${TMPL_PROMPT_MODULE}/cmd \ No newline at end of file