Giter Site home page Giter Site logo

tmp-gomplate-test's Introduction

Minimal Gomplate Test Template

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

Requirements

The gomplate CLI must be installed and available on your PATH.

For example, using go install to install gomplate:

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

Verify gomplate is successfully installed and available on your PATH:

$ 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:

    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. Run the following command to run gomplate, which will place the templatized folders and files into the ./out directory.

    gomplate --verbose
  6. Next, stash your input data file in case it is needed later to start over:

    git stash push -m "input data backup" -- skeleton-data.yaml
  7. Replace the contents of the static template files with the templatized folders and files from the ./out directory.

    ls -A | grep -xv "out" | grep -xv ".git" | xargs rm -rf && \
        mv -vf out/{.,}* . ; \
        rm -r out
    • 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.

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

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

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

    git add -A
    git status
    git commit -m "ci: initial templatization"
    git push -u origin pr-init-template

tmp-gomplate-test's People

Contributors

erharb avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.