Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit e9bf627

Browse files
committed
chore: initial commit
0 parents  commit e9bf627

25 files changed

+531
-0
lines changed

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
end_of_line = lf
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[*.{md,yml,yaml}]
11+
indent_style = space
12+
indent_size = 2

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @nekrich

.github/ISSUE_TEMPLATE/bug_report.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ""
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
11+
<!-- A clear and concise description of what the bug is. -->
12+
13+
**Steps to reproduce**
14+
15+
<!-- Steps to reproduce the behavior: -->
16+
17+
**Expected behavior**
18+
19+
<!-- A clear and concise description of what you expected to happen. -->
20+
21+
**Screenshots**
22+
23+
<!-- If applicable, add screenshots to help explain your problem. -->
24+
25+
**Additional context**
26+
27+
<!-- Add any other context about the problem here. -->
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ""
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
11+
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
12+
13+
**Describe the solution you'd like**
14+
15+
<!-- A clear and concise description of what you want to happen. -->
16+
17+
**Describe alternatives you've considered**
18+
19+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
20+
21+
**Additional context**
22+
23+
<!-- Add any other context or screenshots about the feature request here. -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
## Description
4+
5+
<!--- Describe your changes in detail -->
6+
7+
## Motivation and Context
8+
9+
<!--- Why is this change required? What problem does it solve? -->
10+
<!--- If it fixes an open issue, please link to the issue here. -->
11+
12+
## Types of changes
13+
14+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
15+
16+
- [ ] Bug fix (non-breaking change which fixes an issue)
17+
- [ ] New feature (non-breaking change which adds functionality)
18+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
19+
20+
## Usage examples
21+
22+
<!--- Provide examples of intended usage -->
23+
24+
## How Has This Been Tested?
25+
26+
<!--- Please describe in detail how you tested your changes. -->
27+
28+
## Checklist
29+
30+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
31+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
32+
33+
- [ ] I have updated the documentation accordingly.
34+
- [ ] I have added tests to cover my changes.

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/build.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
plugin_test:
11+
name: asdf plugin test
12+
strategy:
13+
matrix:
14+
os:
15+
- macos-latest
16+
- ubuntu-latest
17+
runs-on: ${{ matrix.os }}
18+
steps:
19+
- name: asdf_plugin_test
20+
uses: asdf-vm/actions/plugin-test@v3
21+
with:
22+
command: xcbeautify --help

.github/workflows/lint.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: asdf-vm/actions/install@v3
15+
- run: scripts/lint.bash
16+
17+
actionlint:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Check workflow files
22+
uses: docker://rhysd/actionlint:1.6.27
23+
with:
24+
args: -color

.github/workflows/release.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: google-github-actions/release-please-action@v4
17+
with:
18+
release-type: simple

.github/workflows/semantic-pr.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Lint
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
semantic-pr:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: amannn/[email protected]
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
with:
18+
validateSingleCommit: true

.gitignore

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/macos,visualstudiocode
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,visualstudiocode
3+
4+
### macOS ###
5+
# General
6+
.DS_Store
7+
.AppleDouble
8+
.LSOverride
9+
10+
# Icon must end with two \r
11+
Icon
12+
13+
14+
# Thumbnails
15+
._*
16+
17+
# Files that might appear in the root of a volume
18+
.DocumentRevisions-V100
19+
.fseventsd
20+
.Spotlight-V100
21+
.TemporaryItems
22+
.Trashes
23+
.VolumeIcon.icns
24+
.com.apple.timemachine.donotpresent
25+
26+
# Directories potentially created on remote AFP share
27+
.AppleDB
28+
.AppleDesktop
29+
Network Trash Folder
30+
Temporary Items
31+
.apdisk
32+
33+
### macOS Patch ###
34+
# iCloud generated files
35+
*.icloud
36+
37+
### VisualStudioCode ###
38+
.vscode/*
39+
!.vscode/settings.json
40+
!.vscode/tasks.json
41+
!.vscode/launch.json
42+
!.vscode/extensions.json
43+
!.vscode/*.code-snippets
44+
45+
# Local History for Visual Studio Code
46+
.history/
47+
48+
# Built Visual Studio Code Extensions
49+
*.vsix
50+
51+
### VisualStudioCode Patch ###
52+
# Ignore all local history of files
53+
.history
54+
.ionide

.tool-versions

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
shellcheck 0.10.0
2+
shfmt 3.8.0

LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
MIT License
3+
4+
Copyright (c) [year] [fullname]
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

README.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<div align="center">
2+
3+
# asdf-xcbeautify [![Build](https://github.com/MacPaw/asdf-xcbeautify/actions/workflows/build.yml/badge.svg)](https://github.com/MacPaw/asdf-xcbeautify/actions/workflows/build.yml) [![Lint](https://github.com/MacPaw/asdf-xcbeautify/actions/workflows/lint.yml/badge.svg)](https://github.com/MacPaw/asdf-xcbeautify/actions/workflows/lint.yml)
4+
5+
[xcbeautify](https://github.com/cpisciotta/xcbeautify) plugin for the [asdf version manager](https://asdf-vm.com).
6+
7+
</div>
8+
9+
# Contents
10+
11+
- [Dependencies](#dependencies)
12+
- [Install](#install)
13+
- [Contributing](#contributing)
14+
- [License](#license)
15+
16+
# Dependencies
17+
18+
- `bash`, `curl`, `tar`, and [POSIX utilities](https://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html).
19+
20+
# Install
21+
22+
Plugin:
23+
24+
```shell
25+
asdf plugin add xcbeautify
26+
# or
27+
asdf plugin add xcbeautify https://github.com/MacPaw/asdf-xcbeautify.git
28+
```
29+
30+
xcbeautify:
31+
32+
```shell
33+
# Show all installable versions
34+
asdf list-all xcbeautify
35+
36+
# Install specific version
37+
asdf install xcbeautify latest
38+
39+
# Set a version globally (on your ~/.tool-versions file)
40+
asdf global xcbeautify latest
41+
42+
# Now xcbeautify commands are available
43+
xcbeautify --help
44+
```
45+
46+
Check [asdf](https://github.com/asdf-vm/asdf) readme for more instructions on how to
47+
install & manage versions.
48+
49+
# Contributing
50+
51+
Contributions of any kind welcome! See the [contributing guide](contributing.md).
52+
53+
[Thanks goes to these contributors](https://github.com/MacPaw/asdf-xcbeautify/graphs/contributors)!
54+
55+
# License
56+
57+
See [LICENSE](LICENSE) © [MacPaw](https://github.com/MacPaw/)

SECURITY.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Security Policy
2+
3+
## Reporting Security Issues
4+
If you believe you have found a security vulnerability in any MacPaw-owned repository, please report it to us through coordinated disclosure.
5+
6+
Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.
7+
8+
Instead, please send an email to security[@]macpaw.com.
9+
10+
Please include as much of the information listed below as you can to help us better understand and resolve the issue:
11+
12+
- The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting)
13+
- Full paths of source file(s) related to the manifestation of the issue
14+
- The location of the affected source code (tag/branch/commit or direct URL)
15+
- Any special configuration required to reproduce the issue
16+
- Step-by-step instructions to reproduce the issue
17+
- Proof-of-concept or exploit code (if possible)
18+
- Impact of the issue, including how an attacker might exploit the issue
19+
20+
This information will help us triage your report more quickly.
21+
22+
## Policy
23+
See MacPaw's [Vulnerability Disclosure Policy](https://macpaw.com/vulnerability-disclosure-policy)

bin/download

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
current_script_path=${BASH_SOURCE[0]}
6+
plugin_dir=$(dirname "$(dirname "$current_script_path")")
7+
8+
# shellcheck source=./lib/utils.bash
9+
source "${plugin_dir}/lib/utils.bash"
10+
11+
mkdir -p "$ASDF_DOWNLOAD_PATH"
12+
13+
# TODO: Adapt this to proper extension and adapt extracting strategy.
14+
release_file="$ASDF_DOWNLOAD_PATH/$TOOL_NAME-$ASDF_INSTALL_VERSION.zip"
15+
16+
# Download tar.gz file to the download directory
17+
download_release "$ASDF_INSTALL_VERSION" "$release_file"
18+
19+
# Extract contents of tar.gz file into the download directory
20+
# tar -xzf "$release_file" -C "$ASDF_DOWNLOAD_PATH" --strip-components=1 || fail "Could not extract $release_file"
21+
if [ "$(uname)" == "Darwin" ]; then
22+
unzip -o "$release_file" -d "$ASDF_DOWNLOAD_PATH" >/dev/null || fail "Could not extract $release_file"
23+
else
24+
tar -xJf "$release_file" -C "$ASDF_DOWNLOAD_PATH" --strip-components=1 || fail "Could not extract $release_file"
25+
ls -la "$ASDF_DOWNLOAD_PATH"
26+
fi
27+
28+
# Remove the tar.gz file since we don't need to keep it
29+
rm "$release_file"

bin/install

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
current_script_path=${BASH_SOURCE[0]}
6+
plugin_dir=$(dirname "$(dirname "$current_script_path")")
7+
8+
# shellcheck source=./lib/utils.bash
9+
source "${plugin_dir}/lib/utils.bash"
10+
11+
install_version "$ASDF_INSTALL_TYPE" "$ASDF_INSTALL_VERSION" "$ASDF_INSTALL_PATH"

0 commit comments

Comments
 (0)