diff --git a/.gitignore b/.gitignore index 67f6bd58..41a7452e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /checkver* +/.cache/ +/.vagrant/ diff --git a/.vscode/Template.jsonc b/.vscode/Template.jsonc index ec26d065..9d7e8455 100644 --- a/.vscode/Template.jsonc +++ b/.vscode/Template.jsonc @@ -86,6 +86,12 @@ "singlebinary.exe", "withOtherName", "andSomeArguments" + ] + ], + "shortcuts": [ // Array Of Array Of Strings (similar to bin) + [ + "file.exe", + "Shortcut Name" ], [ "singlebinary.exe", @@ -94,12 +100,6 @@ "withOtherIcon.ico" ] ], - "shortcuts": [ // String or Array Of Array Of Strings (similar to bin) - [ - "", - "" - ] - ], "psmodule": { "name": "moduleName" }, @@ -123,7 +123,7 @@ }, "autoupdate": { "url": "https://ash258.com#/newName.zip", - "hash": { // Some vendors do not ship hashes 😭 + "hash": { // Some vendors do not ship hashes "url": "https://ash258.com", "regex": "do not write regexes for hash algorithms, use variables ($md5, $sha1, $sha256, $sha512, $checksum)" }, diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 76eb8e0a..4aec027e 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,9 +1,12 @@ { "recommendations": [ + "CoenraadS.bracket-pair-colorizer-2", + "DavidAnson.vscode-markdownlint", "EditorConfig.EditorConfig", - "ms-vscode.PowerShell", "fabiospampinato.vscode-terminals", - "usernamehw.errorlens", + "ms-vscode.powershell-preview", "redhat.vscode-yaml", + "usernamehw.errorlens", + "yzhang.markdown-all-in-one", ], } diff --git a/.vscode/json.code-snippets b/.vscode/json.code-snippets index b9a0c9c2..66bd5e64 100644 --- a/.vscode/json.code-snippets +++ b/.vscode/json.code-snippets @@ -95,10 +95,19 @@ "body": [ "\"\\$file = '$1'\",", "\"if (!(Test-Path \\\"\\$persist_dir\\\\\\\\\\$file\\\")) {\",", - "\"\tWrite-Host 'File' \\$file 'does not exists. Creating.' -f Yellow\",", "\"\t\\$CONT = @('$2')\",", - "\"\tSet-Content \\\"\\$dir\\\\\\\\\\$file\\\" (\\$CONT -join \\\"`r`n\\\") -Encoding Ascii\",", + "\"\tSet-Content \\\"\\$dir\\\\\\\\\\$file\\\" $CONT -Encoding Ascii\",", "\"}\"", ], }, + "Inline persist check (With content)": { + "prefix": "persistInlineContent", + "scope": "json,jsonc", + "body": "\"if (! (Test-Path \\\"\\$persist_dir\\\\\\\\$1\\\")) { Set-Content \\\"\\$dir\\\\\\\\$1\\\" $2 -Encoding Ascii }\",", + }, + "Inline persist check (without content)": { + "prefix": "persistInlineNoContent", + "scope": "json,jsonc", + "body": "\"if (! (Test-Path \\\"\\$persist_dir\\\\\\\\$1\\\")) { New-Item \\\"\\$dir\\\\\\\\$1\\\" | Out-Null }\",", + }, } diff --git a/.vscode/settings.json b/.vscode/settings.json index bd8584e4..7188ed2c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,16 +9,6 @@ }, ], "powershell.codeFormatting.preset": "OTBS", - "yaml.format.bracketSpacing": true, - "yaml.format.enable": true, - "yaml.format.singleQuote": true, - "yaml.validate": true, - "yaml.schemas": { - "http://json.schemastore.org/appveyor": "appveyor.yml", - "https://raw.githubusercontent.com/lukesampson/scoop/master/schema.json": [ - "bucket/*.yml", - ], - }, "terminals.terminals": [ { "name": "Powershell", @@ -51,4 +41,17 @@ "open": true, }, ], + "yaml.format.bracketSpacing": true, + "yaml.format.enable": true, + "yaml.format.singleQuote": true, + "yaml.validate": true, + "yaml.schemas": { + "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/appveyor.json": "appveyor.yml", + "https://raw.githubusercontent.com/lukesampson/scoop/master/schema.json": [ + "bucket/*.yml", + ], + "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json": [ + ".github/workflows/*", + ], + }, } diff --git a/DELETE THIS REPO b/DELETE THIS REPO new file mode 100644 index 00000000..fb80521a --- /dev/null +++ b/DELETE THIS REPO @@ -0,0 +1 @@ +DELETE THIS REPOSITORY AND ADOPT IT USING TEMPLATE diff --git a/README.md b/README.md index 997bb77a..3d830ae3 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,21 @@ In this repository you will find everything you need to know about creating custom bucket with appveyor support. +- [Files and helpers](#files-and-helpers) + - [`bucket` Folder](#bucket-folder) + - [`bin` Folder](#bin-folder) + - [`Bucket.Tests.ps1` File](#buckettestsps1-file) + - [`.vscode` Folder](#vscode-folder) + - [`.github` Folder](#github-folder) + - [`config files`](#config-files) +- [How to use and adopt this bucket](#how-to-use-and-adopt-this-bucket) + ## Files and helpers ### `bucket` Folder - All manifests belong here -- `.gitkeep` file could be removed after you push your first manifest +- `.gitkeep` file could be removed when you push your first manifest ### `bin` Folder @@ -44,7 +53,7 @@ Contains all syntax highlighting, code formating, manifest creating tools you co - Create only architecture property with 64bit and 32bit - `upAr` - Create autoupdate property with architecture - - `persistCheck` + - `persistCheck`, `persistInlineContent`, `persistInlineNoContent` - Installer / pre_install script for checking if file is already persisted or need to be created ### `.github` Folder @@ -53,7 +62,7 @@ GitHub repository configuration. - `workflows` folder - Linux (legacy) version [GitHub Actions](https://github.com/features/actions) configuration for automatic issue/PR/updates handling. - - Windows version of actions could be used for better and future proof implementation (see for updated configs) + - Windows version of actions could be used for better and future proof implementation (see for updated configs) - `CODEOWNERS` - Pull requests will request review for users defined in this file - `PULL REQUEST TEMPLATE` @@ -96,10 +105,12 @@ GitHub repository configuration. - Only master branch is better, since you can freely test in other branches and do not mystificate users - [You could use alternative styles](https://shields.io/category/build#styles) 1. Clone project into some folder + - `git clone git@github.com:USER/REPO.git MyAwesomeBucket` + - or - `git clone https://github.com/USER/REPO.git MyAwesomeBucket` 1. Open vscode with this clone - `code MyAwesomeBucket` -1. Configure remote repository +1. _[optional]_ Configure remote repository 1. `git remote add 'upstream' 'https://github.com/Ash258/GenericBucket.git'` - This step will allow you to synchronize changes with this template repository - If some changes are pushed into this repository and you want to reflect them into your bucket, you can simply do something like: @@ -108,6 +119,7 @@ GitHub repository configuration. - Do changes - `git merge master` or create PR in github 1. Create proper README.md + 1. [Open this README in the browser for reference](https://github.com/Ash258/GenericBucket/tree/master/README.md) 1. Open `README.template.md` 1. Replace all `%%templatestring%%` with real and according values 1. Replace appveyor status badge with yours @@ -119,4 +131,4 @@ GitHub repository configuration. 1. Actions 1. Open each file in `.github\workflows` and change `youremail@email.com` with your email 1. Visit for more information -1. 🎉🎉 Everything set. High Quality bucket is ready for new users 🎉🎉 +1. 🎉🎉 Everything set. High quality and automated bucket is ready for new users 🎉🎉