From 7e2900aa66cc24a4c575d0f48847d797520e0f7a Mon Sep 17 00:00:00 2001
From: Rashil Gandhi <rashil2000@gmail.com>
Date: Mon, 27 Dec 2021 23:52:24 +0530
Subject: [PATCH] Add boilerplate

---
 .editorconfig                             | 20 +++++++++
 .gitattributes                            |  2 +
 .github/ISSUE_TEMPLATE/Bug_report.md      | 49 +++++++++++++++++++++++
 .github/ISSUE_TEMPLATE/Package_request.md | 27 +++++++++++++
 .github/issue_template.md                 | 12 ++++++
 .github/pull_request_template.md          | 15 +++++++
 .github/workflows/excavator.yml           | 17 ++++++++
 .github/workflows/issue_comment.yml       | 15 +++++++
 .github/workflows/issues.yml              | 15 +++++++
 .github/workflows/pull_request.yml        | 14 +++++++
 .gitignore                                |  5 +++
 .markdownlint.json                        |  6 +++
 .vscode/extensions.json                   |  6 +++
 .vscode/settings.json                     | 26 ++++++++++++
 README.md                                 | 21 ++++++++++
 appveyor.yml                              | 39 ++++++++++++++++++
 bin/auto-pr.ps1                           |  9 +++++
 bin/checkurls.ps1                         |  4 ++
 bin/checkver.ps1                          |  4 ++
 bin/formatjson.ps1                        |  4 ++
 bin/missing-checkver.ps1                  |  4 ++
 bin/test.ps1                              |  2 +
 bucket/.gitkeep                           |  2 +
 deprecated/.gitkeep                       |  2 +
 scripts/.gitkeep                          |  2 +
 25 files changed, 322 insertions(+)
 create mode 100644 .editorconfig
 create mode 100644 .gitattributes
 create mode 100644 .github/ISSUE_TEMPLATE/Bug_report.md
 create mode 100644 .github/ISSUE_TEMPLATE/Package_request.md
 create mode 100644 .github/issue_template.md
 create mode 100644 .github/pull_request_template.md
 create mode 100644 .github/workflows/excavator.yml
 create mode 100644 .github/workflows/issue_comment.yml
 create mode 100644 .github/workflows/issues.yml
 create mode 100644 .github/workflows/pull_request.yml
 create mode 100644 .gitignore
 create mode 100644 .markdownlint.json
 create mode 100644 .vscode/extensions.json
 create mode 100644 .vscode/settings.json
 create mode 100644 README.md
 create mode 100644 appveyor.yml
 create mode 100644 bin/auto-pr.ps1
 create mode 100644 bin/checkurls.ps1
 create mode 100644 bin/checkver.ps1
 create mode 100644 bin/formatjson.ps1
 create mode 100644 bin/missing-checkver.ps1
 create mode 100644 bin/test.ps1
 create mode 100644 bucket/.gitkeep
 create mode 100644 deprecated/.gitkeep
 create mode 100644 scripts/.gitkeep

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..b624966
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,20 @@
+# EditorConfig (is awesome): http://EditorConfig.org
+
+# * top-most EditorConfig file
+root = true
+
+# default style settings
+[*]
+charset = utf-8
+end_of_line = crlf
+indent_size = 4
+indent_style = space
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.{yml,yaml}]
+indent_size = 2
+
+[*.{[Bb][Aa][Tt],[Cc][Mm][Dd]}]
+# DOS/Win *requires* BAT/CMD files to have CRLF newlines
+end_of_line = crlf
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..06b5169
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+# retain windows line-endings in case checked out on mac or linux
+* text eol=crlf
diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md
new file mode 100644
index 0000000..a5a5dd9
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/Bug_report.md
@@ -0,0 +1,49 @@
+---
+name: "Bug Report"
+about: "I am facing some problems."
+title: ""
+labels: "bug"
+---
+
+<!--
+  By opening this issue you confirm that you have searched for similar issues/PRs here already.
+  Failing to do so will most likely result in closing of this issue without any explanation.
+  Incomplete form details below might also result in closing of the issue.
+-->
+
+## Bug Report
+
+**Package Name:** [name of package which has bug(s)]
+
+### Current Behaviour
+
+<!-- A clear and concise description of the behaviour. -->
+
+### Expected Behaviour
+
+<!-- A clear and concise description of what you expected to happen. -->
+
+### Additional context/output
+
+<!-- Add any other context about the problem here. If applicable, paste terminal output here to help explain. -->
+
+### Possible Solution
+
+<!--- Only if you have suggestions on a fix for the bug -->
+
+### System details
+
+**Windows version:** [e.g. 7, 8, 10]
+
+**OS architecture:** [e.g. 32bit, 64bit]
+
+**PowerShell version:** [output of `"$($PSVersionTable.PSVersion)"`]
+
+**Additional software:** [(optional) e.g. ConEmu, Git]
+
+#### Scoop Configuration
+<!-- Can be found in  ~/.config/scoop/config.json -->
+
+```json
+//# Your configuration here
+```
diff --git a/.github/ISSUE_TEMPLATE/Package_request.md b/.github/ISSUE_TEMPLATE/Package_request.md
new file mode 100644
index 0000000..511b491
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/Package_request.md
@@ -0,0 +1,27 @@
+---
+name: "Package Request"
+about: "I have a suggestion for a package (and may want to implement it)!"
+title: "[Request] "
+labels: "package-request"
+---
+
+<!--
+  By opening this issue you confirm that you have searched for similar issues/PRs here already.
+  Failing to do so will most likely result in closing of this issue without any explanation.
+  Incomplete form details below might also result in closing of the issue.
+-->
+
+## Package Request
+
+### Information
+
+**Name:** [name of new package]
+
+**Description:** [clear and concise details of what it is]
+
+**Homepage:** [a URL/link]
+
+**Download link(s):** [URL(s)/link(s)]
+
+**Some indication of popularity/repute:** [GitHub stars/software reviews etc.]
+
diff --git a/.github/issue_template.md b/.github/issue_template.md
new file mode 100644
index 0000000..1df5c02
--- /dev/null
+++ b/.github/issue_template.md
@@ -0,0 +1,12 @@
+
+<!--
+  By opening this issue you confirm that you have searched for similar issues/PRs here already.
+  Failing to do so will most likely result in closing of this issue without any explanation.
+-->
+
+#### Scoop Configuration
+<!-- Can be found in  ~/.config/scoop/config.json -->
+
+```json
+//# Your configuration here
+```
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 0000000..f7dd672
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,15 @@
+<!-- Provide a general summary of your changes in the title above -->
+
+<!--
+  By opening this PR you confirm that you have searched for similar issues/PRs here already.
+  Failing to do so will most likely result in closing of this PR without any explanation.
+  It is also mandatory to open a relevant issue (either Package Request or Bug Report) for
+  discussion with the maintainers, before creating any new PR.
+  Read the contributing guide first to save both your and our time.
+-->
+
+Closes #XXXX
+<!-- or -->
+Relates to #XXXX
+
+- [ ] I have read the [Contributing Guide](https://github.com/ScoopInstaller/.github/blob/main/.github/CONTRIBUTING.md).
diff --git a/.github/workflows/excavator.yml b/.github/workflows/excavator.yml
new file mode 100644
index 0000000..081c421
--- /dev/null
+++ b/.github/workflows/excavator.yml
@@ -0,0 +1,17 @@
+on:
+  workflow_dispatch:
+  schedule:
+    # run every 4 hours
+    - cron: '20 */4 * * *'
+name: Excavator
+jobs:
+  excavate:
+    name: Excavate
+    runs-on: windows-latest
+    steps:
+    - uses: actions/checkout@main
+    - name: Excavate
+      uses: ScoopInstaller/GithubActions@main
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        SKIP_UPDATED: '1'
diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml
new file mode 100644
index 0000000..2286114
--- /dev/null
+++ b/.github/workflows/issue_comment.yml
@@ -0,0 +1,15 @@
+on:
+  issue_comment:
+    types: [ created ]
+name: Commented Pull Request
+jobs:
+  pullRequestHandler:
+    name: PullRequestHandler
+    runs-on: windows-latest
+    steps:
+    - uses: actions/checkout@main
+    - name: PullRequestHandler
+      uses: ScoopInstaller/GithubActions@main
+      if: startsWith(github.event.comment.body, '/verify')
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml
new file mode 100644
index 0000000..a16162b
--- /dev/null
+++ b/.github/workflows/issues.yml
@@ -0,0 +1,15 @@
+on:
+  issues:
+    types: [ opened, labeled ]
+name: Issues
+jobs:
+  issueHandler:
+    name: IssueHandler
+    runs-on: windows-latest
+    steps:
+    - uses: actions/checkout@main
+    - name: IssueHandler
+      uses: ScoopInstaller/GithubActions@main
+      if: github.event.action == 'opened' || (github.event.action == 'labeled' && contains(github.event.issue.labels.*.name, 'verify'))
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
new file mode 100644
index 0000000..bc0d222
--- /dev/null
+++ b/.github/workflows/pull_request.yml
@@ -0,0 +1,14 @@
+on:
+  pull_request:
+    types: [ opened ]
+name: Pull Requests
+jobs:
+  pullRequestHandler:
+    name: PullRequestHandler
+    runs-on: windows-latest
+    steps:
+    - uses: actions/checkout@main
+    - name: PullRequestHandler
+      uses: ScoopInstaller/GithubActions@main
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c221b4a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.sublime-workspace
+*~
+._*
+page.html
+checkver-*.html
diff --git a/.markdownlint.json b/.markdownlint.json
new file mode 100644
index 0000000..ef592cf
--- /dev/null
+++ b/.markdownlint.json
@@ -0,0 +1,6 @@
+{
+  "MD013": false,
+  "MD024": {
+    "siblings_only": true
+  }
+}
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 0000000..a9056e4
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,6 @@
+{
+    "recommendations": [
+        "EditorConfig.EditorConfig",
+        "ms-vscode.PowerShell"
+    ]
+}
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..cbcd227
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,26 @@
+// Configure PSScriptAnalyzer settings
+{
+    "[powershell]": {
+        "editor.formatOnSave": true
+    },
+    "powershell.scriptAnalysis.settingsPath": "PSScriptAnalyzerSettings.psd1",
+    "powershell.codeFormatting.preset": "OTBS",
+    "powershell.codeFormatting.alignPropertyValuePairs": true,
+    "powershell.codeFormatting.ignoreOneLineBlock": true,
+    "json.schemas": [
+        {
+            "url": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json",
+            "fileMatch": [
+                "bucket/*.json"
+            ]
+        }
+    ],
+    "files.exclude": {
+        "**/.git": true,
+        "**/.svn": true,
+        "**/.hg": true,
+        "**/CVS": true,
+        "**/.DS_Store": true,
+        "**/tmp": true
+    }
+}
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..4c343e3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,21 @@
+# Scoop Bucket Template
+
+Template bucket for [Scoop](https://scoop.sh), the Windows command-line installer.
+
+How do I install these manifests?
+---------------------------------
+
+To add this bucket, run `scoop bucket add <bucketname> https://github.com/<username>/<bucketname>`. To install, do `scoop install <manifest>`.
+
+How do I contribute new manifests?
+----------------------------------
+
+To make a new manifest conribution, please read the [Contributing Guide](https://github.com/ScoopInstaller/.github/blob/main/.github/CONTRIBUTING.md).
+
+----
+
+#### To use this template
+
+- Modify the Readme.md and the bin/auto-pr.ps1 files accordingly.
+- Enable GitHub Actions for this repository.
+- Login to AppVeyor and import this repository.
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..69efdaf
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,39 @@
+version: "{build}-{branch}"
+branches:
+  except:
+    - gh-pages
+build: off
+deploy: off
+clone_depth: 2
+image: Visual Studio 2019
+environment:
+  scoop: C:\projects\scoop
+  scoop_home: C:\projects\scoop
+  scoop_helpers: C:\projects\helpers
+  lessmsi: '%scoop_helpers%\lessmsi\lessmsi.exe'
+  innounp: '%scoop_helpers%\innounp\innounp.exe'
+  matrix:
+    - PowerShell: 5
+    - PowerShell: Current
+cache:
+  - '%USERPROFILE%\Documents\WindowsPowerShell\Modules -> appveyor.yml'
+  - C:\projects\helpers  -> appveyor.yml, test\bin\*.ps1
+matrix:
+  fast_finish: true
+init:
+  - ps: if(!(Test-Path "$env:SCOOP")) { git clone -q --depth=1 "https://github.com/ScoopInstaller/Scoop" "$env:SCOOP" }
+for:
+  - matrix:
+      only:
+        - PowerShell: 5
+    install:
+      - ps: . "$env:SCOOP_HOME\test\bin\init.ps1"
+    test_script:
+      - ps: . "$env:SCOOP_HOME\test\bin\test.ps1" -TestPath "$env:APPVEYOR_BUILD_FOLDER"
+  - matrix:
+      only:
+        - PowerShell: Current
+    install:
+      - pwsh: . "$env:SCOOP_HOME\test\bin\init.ps1"
+    test_script:
+      - pwsh: . "$env:SCOOP_HOME\test\bin\test.ps1" -TestPath "$env:APPVEYOR_BUILD_FOLDER"
diff --git a/bin/auto-pr.ps1 b/bin/auto-pr.ps1
new file mode 100644
index 0000000..07c3b35
--- /dev/null
+++ b/bin/auto-pr.ps1
@@ -0,0 +1,9 @@
+param(
+    # overwrite upstream param
+    [String]$upstream = "<username>/<bucketname>:main"
+)
+
+if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) }
+$autopr = "$env:SCOOP_HOME/bin/auto-pr.ps1"
+$dir = "$psscriptroot/../bucket" # checks the parent dir
+Invoke-Expression -command "& '$autopr' -dir '$dir' -upstream $upstream $($args | ForEach-Object { "$_ " })"
diff --git a/bin/checkurls.ps1 b/bin/checkurls.ps1
new file mode 100644
index 0000000..8d2ca12
--- /dev/null
+++ b/bin/checkurls.ps1
@@ -0,0 +1,4 @@
+if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) }
+$checkurls = "$env:SCOOP_HOME/bin/checkurls.ps1"
+$dir = "$psscriptroot/../bucket" # checks the parent dir
+Invoke-Expression -command "& '$checkurls' -dir '$dir' $($args | ForEach-Object { "$_ " })"
diff --git a/bin/checkver.ps1 b/bin/checkver.ps1
new file mode 100644
index 0000000..fe8942d
--- /dev/null
+++ b/bin/checkver.ps1
@@ -0,0 +1,4 @@
+if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) }
+$checkver = "$env:SCOOP_HOME/bin/checkver.ps1"
+$dir = "$psscriptroot/../bucket" # checks the parent dir
+Invoke-Expression -command "& '$checkver' -dir '$dir' $($args | ForEach-Object { "$_ " })"
diff --git a/bin/formatjson.ps1 b/bin/formatjson.ps1
new file mode 100644
index 0000000..4fe306d
--- /dev/null
+++ b/bin/formatjson.ps1
@@ -0,0 +1,4 @@
+if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) }
+$formatjson = "$env:SCOOP_HOME/bin/formatjson.ps1"
+$path = "$psscriptroot/../bucket" # checks the parent dir
+Invoke-Expression -command "& '$formatjson' -dir '$path' $($args | ForEach-Object { "$_ " })"
diff --git a/bin/missing-checkver.ps1 b/bin/missing-checkver.ps1
new file mode 100644
index 0000000..8c03066
--- /dev/null
+++ b/bin/missing-checkver.ps1
@@ -0,0 +1,4 @@
+if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) }
+$missing_checkver = "$env:SCOOP_HOME/bin/missing-checkver.ps1"
+$dir = "$psscriptroot/../bucket" # checks the parent dir
+Invoke-Expression -command "& '$missing_checkver' -dir '$dir' $($args | ForEach-Object { "$_ " })"
diff --git a/bin/test.ps1 b/bin/test.ps1
new file mode 100644
index 0000000..183d464
--- /dev/null
+++ b/bin/test.ps1
@@ -0,0 +1,2 @@
+if(!$env:SCOOP_HOME) { $env:SCOOP_HOME = Resolve-Path (scoop prefix scoop) }
+Invoke-Pester "$psscriptroot/.."
diff --git a/bucket/.gitkeep b/bucket/.gitkeep
new file mode 100644
index 0000000..acf3e6b
--- /dev/null
+++ b/bucket/.gitkeep
@@ -0,0 +1,2 @@
+# This directory stores all the JSON manifests.
+# Delete this '.gitkeep' file once this directory has any files.
diff --git a/deprecated/.gitkeep b/deprecated/.gitkeep
new file mode 100644
index 0000000..0a1c7c4
--- /dev/null
+++ b/deprecated/.gitkeep
@@ -0,0 +1,2 @@
+# This directory stores all the deprecated JSON manifests, which are not meant to be installed.
+# Delete this '.gitkeep' file once this directory has any files.
diff --git a/scripts/.gitkeep b/scripts/.gitkeep
new file mode 100644
index 0000000..2f6a3f6
--- /dev/null
+++ b/scripts/.gitkeep
@@ -0,0 +1,2 @@
+# This directory stores helper files like shell scripts, registry entries etc. for installable applications.
+# Delete this '.gitkeep' file once this directory has any files.