Skip to content

Commit

Permalink
Merge pull request #87 from carlocorradini/upstart
Browse files Browse the repository at this point in the history
feat: upstart and better project structure
  • Loading branch information
carlocorradini authored Dec 18, 2023
2 parents cfc225c + 08f4b4d commit 6688a66
Show file tree
Hide file tree
Showing 24 changed files with 3,351 additions and 3,786 deletions.
10 changes: 0 additions & 10 deletions .commitlintrc

This file was deleted.

40 changes: 37 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
* text=auto
* text=auto eol=lf

# Source code
*.bash text eol=lf
*.bat text eol=crlf
*.c text diff=cpp
*.cc text diff=cpp
*.cmd text eol=crlf
*.coffee text
*.cpi text diff=cpp
*.cpp text diff=cpp
*.css text diff=css
*.cxx text diff=cpp
*.c++ text diff=cpp
*.h text diff=cpp
*.hh text diff=cpp
*.hpp text diff=cpp
*.htm text diff=html
*.html text diff=html
*.h++ text diff=cpp
*.inc text
*.ini text
*.js text
Expand All @@ -23,6 +33,7 @@
*.ps1 text eol=crlf
*.py text diff=python
*.rb text diff=ruby
*.rs text diff=rust
*.sass text
*.scm text
*.scss text diff=css
Expand All @@ -35,6 +46,27 @@
*.xml text
*.xhtml text diff=html

# Compiled Object files
*.slo binary
*.lo binary
*.o binary
*.obj binary

# Precompiled Headers
*.gch binary
*.pch binary

# Compiled Dynamic libraries
*.so binary
*.dylib binary
*.dll binary

# Compiled Static libraries
*.lai binary
*.la binary
*.a binary
*.lib binary

# Docker
Dockerfile text

Expand Down Expand Up @@ -84,6 +116,7 @@ TODO text
*.vue text

# Configs
Cargo.lock text
*.cnf text
*.conf text
*.config text
Expand All @@ -98,7 +131,7 @@ package-lock.json text -diff
pnpm-lock.yaml text eol=lf -diff
.prettierrc text
yarn.lock text -diff
*.toml text
*.toml text diff=toml
*.yaml text
*.yml text
browserslist text
Expand Down Expand Up @@ -178,7 +211,8 @@ Procfile text

# Executables
*.exe binary
*.pyc binary
*.out binary
*.app binary

# RC files
*.*rc text
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
attributes:
label: Reference Issues
description: Common issues.
placeholder: '#Issues IDs'
placeholder: "#Issues IDs"
validations:
required: false
- type: textarea
Expand Down
10 changes: 5 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: 'weekly'
interval: "weekly"
ignore:
- dependency-name: '*'
update-types: ['version-update:semver-patch']
- dependency-name: "*"
update-types: ["version-update:semver-patch"]
11 changes: 0 additions & 11 deletions .github/stale.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: check

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Install dependencies
run: npm ci
- name: Check
run: npm run check
34 changes: 0 additions & 34 deletions .github/workflows/ci.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/license.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: license

on:
schedule:
- cron: "0 0 1 1 *"

jobs:
license:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: FantasticFiasco/action-update-license-year@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
node_modules/
**/node_modules/
**/package-lock.json
/.husky/_/
/.gitattributes
6 changes: 0 additions & 6 deletions .husky/commit-msg

This file was deleted.

2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# shellcheck disable=SC1091
# shellcheck source=SCRIPTDIR/_/husky.sh
. "$(dirname "$0")/_/husky.sh"

npx --no -- lint-staged
4 changes: 2 additions & 2 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"*.{json,md}": "prettier --write",
"*.md": "markdownlint"
"*.{json,md}": "npx prettier --write",
"*.md": "npx markdownlint"
}
2 changes: 1 addition & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"default": true,
"extends": "markdownlint/style/prettier",
"line-length": false
}
3 changes: 3 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
**/node_modules/
**/package-lock.json
/.husky/_/
/.gitattributes
5 changes: 1 addition & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"printWidth": 80,
"semi": true,
"singleQuote": true,
"trailingComma": "none"
"plugins": ["prettier-plugin-sh"]
}
1 change: 1 addition & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
external-sources=true
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"recommendations": [
"DavidAnson.vscode-markdownlint",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"Gruntfuggly.todo-tree",
"mads-hartmann.bash-ide-vscode",
"streetsidesoftware.code-spell-checker",
"timonwong.shellcheck",
"usernamehw.errorlens"
]
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[markdown]": {
"editor.wordWrap": "off"
}
}
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@ VSCode is natively supported and configured with recommended extensions and sett

Before creating a pull request execute the following commands:

```console
```sh
npm run fix && npm run check
```

## Setup

1. Install dependencies

```console
```sh
npm ci
```

1. Edit [`install.sh`](./install.sh)

## Check

```console
```sh
npm run check
```

## Fix

```console
```sh
npm run fix
```
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# [Node exporter](https://github.com/prometheus/node_exporter) installation script

[![ci](https://github.com/carlocorradini/node_exporter_installer/actions/workflows/ci.yml/badge.svg)](https://github.com/carlocorradini/node_exporter_installer/actions/workflows/ci.yml)
[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)
[![check](https://github.com/carlocorradini/node_exporter_installer/actions/workflows/check.yaml/badge.svg)](https://github.com/carlocorradini/node_exporter_installer/actions/workflows/check.yaml)

Inspired by [K3s](https://github.com/k3s-io/k3s) `install.sh`

Expand Down
38 changes: 38 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"version": "0.2",
"language": "en",
"useGitignore": true,
"import": [
"@cspell/dict-npm/cspell-ext.json",
"@cspell/dict-shell/cspell-ext.json"
],
"ignorePaths": ["**/node_modules/", "**/package-lock.json"],
"words": [
"aarch",
"armv",
"chcon",
"corradini",
"copytruncate",
"dport",
"fcontext",
"getenforce",
"killall",
"localmount",
"mipsle",
"mktemp",
"missingok",
"nproc",
"notifempty",
"openrc",
"pidfile",
"policycoreutils",
"respawn",
"restorecon",
"runlevels",
"runlevel",
"semanage",
"shellcheck",
"sysconfig",
"tada"
]
}
Loading

0 comments on commit 6688a66

Please sign in to comment.