Skip to content

Commit

Permalink
Added dev containers
Browse files Browse the repository at this point in the history
  • Loading branch information
richardwooding committed Nov 22, 2024
1 parent 38183c2 commit 1ae879e
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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 )
Expand Down
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {extends: [@commitlint/config-conventional’]};

0 comments on commit 1ae879e

Please sign in to comment.