Skip to content

Commit

Permalink
hotfix(boilerplate): completed boilerplate with default files
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Rios <[email protected]>
  • Loading branch information
rios0rios0 committed Aug 17, 2024
1 parent 42e86ce commit 6a5e61a
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 30 deletions.
10 changes: 7 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
root = true

[Makefile]
indent_style = tab

[*.go]
indent_style = tab
indent_size = 4
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[Makefile]
indent_style = tab
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions .github/pull_request_template/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## :vertical_traffic_light: Quality checklist

- [ ] Did you add the changes in the `CHANGELOG.md`?
- [ ] Did you run all the code checks? (`go test`)
- [ ] Are the tests passing?
22 changes: 22 additions & 0 deletions .github/workflows/default.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'default'

on:
push:
branches:
- 'main'
tags:
- '*'
pull_request:
branches:
- 'main'
workflow_dispatch:

permissions:
checks: 'write' # code_check-style_golangci_lint
contents: 'write' # delivery-release

jobs:
default:
uses: 'rios0rios0/pipelines/.github/workflows/go-binary.yaml@main'
with:
binary_name: 'versainit'
26 changes: 3 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
# Built binaries
bin/
bin

# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
go.work
# this space is for project generated files, DO NOT add personal or IDE files here
# try to use ~/.gitignore of your user for your workspace generated files
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

When a new release is proposed:

1. Create a new branch `bump/x.x.x` (this isn't a long-lived branch!!!);
2. The Unreleased section on `CHANGELOG.md` gets a version number and date;
3. Open a Pull Request with the bump version changes targeting the `main` branch;
4. When the Pull Request is merged, a new `git` tag must be created using [GitHub environment](https://github.com/rios0rios0/versainit/tags).

Releases to productive environments should run from a tagged version.
Exceptions are acceptable depending on the circumstances (critical bug fixes that can be cherry-picked, etc.).

## [Unreleased]

### Added
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 rios0rios0

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
19 changes: 15 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
build:
go build -o bin/vinit ./cmd/versainit
strip -s bin/vinit
rm -rf bin
go build -o bin/vinit ./cmd/vinit
strip -s bin/vinit

debug:
rm -rf bin
go build -gcflags "-N -l" -o bin/autobump ./cmd/vinit

build-musl:
CGO_ENABLED=1 CC=musl-gcc go build \
--ldflags 'linkmode external -extldflags="-static"' -o bin/vinit ./cmd/vinit
strip -s bin/vinit

run:
go run ./cmd/versainit
go run ./cmd/vinit

install:
cp -v bin/vinit /usr/local/bin/vinit
make build
sudo cp -v bin/vinit /usr/local/bin/vinit
4 changes: 4 additions & 0 deletions horusec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"horusecCliFalsePositiveHashes": [],
"horusecCliRiskAcceptHashes": []
}

0 comments on commit 6a5e61a

Please sign in to comment.