Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 2 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,3 @@
# Minimal Gomplate Test Template
# foo-repo

This template project is intended for tesing `gomplate` for use with a GitHub Template.

## Requirements

The [gomplate](https://docs.gomplate.ca/installing/) CLI must be installed and available on your `PATH`.

For example, using `go install` to install `gomplate`:

```bash
go install github.com/hairyhenderson/gomplate/v3/cmd/gomplate@latest
```

Verify gomplate is successfully installed and available on your `PATH`:

```bash
$ gomplate --version
gomplate version 0.0.0
```

## Usage

1. Create a new repository in GitHub and select this template as the "Repository template".

2. After creating the new repository, clone it locally.

3. From the local repository root folder, create and switch to a new branch, for example `pr-init-template`:

```bash
git switch -c pr-init-template
```

4. Modify the included `skeleton-data.yaml` input data file with the appropriate substitution
values for the provided properties for your new project.

5. Stash your input data file in case it is needed later to start over:

```bash
git stash store "$(git stash create)" -m "gomplate input data backup"
```

6. Run the following command to run gomplate, which will replace all contents of the current
directory with the template output.

```bash
gomplate --verbose
```

- If you need to start the templatization process over, reset the git index to origin/main.

**NOTE**: Backup files if necessary first, this will delete **all** local changes.

```bash
git reset --hard origin/main && git clean -dfx
```

The input data file can then be recovered from the stash to start over with.

```bash
git stash apply
```

8. When satisified with the results, commit, push, and create the first Pull Request!

```bash
git add -A
git status
git commit -m "ci: initial templatization"
git push -u origin pr-init-template
```
The "Foo Repo" project is a simple templatized test.
5 changes: 5 additions & 0 deletions packaging/foo-repo/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
name: foo-repo
display: Foo Repo
jinjaTest: {{ must.remain.post.gomplate }}
version: 0.0.1