diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh new file mode 100755 index 0000000..92b9fc7 --- /dev/null +++ b/.devcontainer/post-create.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +# Running inside docker +if ! [ -f "/.dockerenv" ] +then + echo "Error: This script must be run inside a docker container" + exit 1 +fi + +if [ -f ".env" ] +then + . .env +fi + +# Git Configuration +git config --global --add safe.directory ${localWorkspaceFolder} + +git config --global user.name "${GITHUB_USER}" +git config --global user.email "${GITHUB_EMAIL}" + +. ${NVM_DIR}/nvm.sh +nvm install --lts +npm install -g @commitlint/cli @commitlint/config-conventional +pre-commit install diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..517b533 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,8 @@ +* text=auto eol=lf +*.{cmd,[cC][mM][dD]} text eol=crlf +*.{bat,[bB][aA][tT]} text eol=crlf +*.gif binary +*.jpeg binary +*.png binary +*.gz binary +*.jar binary diff --git a/README.md b/README.md index 30ffeb7..ab42109 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ # with SPAN Digital's take on the Functional Options Pattern using Generics -![build](https://github.com/spandigital/with/actions/workflows/go.yml/badge.svg) +[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/SPANDigital/with) +![Develop Go Action Workflow Status](https://img.shields.io/github/actions/workflow/status/spandigital/with/go.yml?branch=develop&label=develop) +![Main Go Action Workflow Status](https://img.shields.io/github/actions/workflow/status/spandigital/with/go.yml?branch=main&label=main) +![Release status](https://img.shields.io/github/v/tag/SPANDigital/with) ### Features - Supports default options (use ```SetDefaults()``` pointer receiver ) diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 0000000..31fd41a --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1 @@ +module.exports = {extends: [‘@commitlint/config-conventional’]};