From baa38828e49ef8aeeb500c71c1c6d5949ffa15b0 Mon Sep 17 00:00:00 2001 From: Chen Asraf Date: Tue, 16 May 2023 14:52:19 +0300 Subject: [PATCH] build: remove setup script --- Makefile | 4 --- scripts/setup.sh | 79 ------------------------------------------------ 2 files changed, 83 deletions(-) delete mode 100755 scripts/setup.sh diff --git a/Makefile b/Makefile index 230a401..1f62076 100644 --- a/Makefile +++ b/Makefile @@ -31,10 +31,6 @@ documentation-ci: deps documentation lint: stylua . -# setup -setup: - ./scripts/setup.sh - # precommit precommit: stylua . diff --git a/scripts/setup.sh b/scripts/setup.sh deleted file mode 100755 index 7f9a59b..0000000 --- a/scripts/setup.sh +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash - -USAGE="\033[0;37m[INFO] - usage: USERNAME=my-github-username PLUGIN_NAME=my-awesome-plugin REPOSITORY_NAME=my-awesome-plugin.nvim make setup\n\033[0m" - -echo -e "$USAGE" - -if [[ -z "$USERNAME" ]]; then - echo -e "\t> No USERNAME provided, what's your GitHub/GitLab username?" - read -r USERNAME -fi - -if [[ -z "$REPOSITORY_NAME" ]]; then - REPOSITORY_NAME=$(basename -s .git "$(git config --get remote.origin.url)") - - read -rp $'\t> No REPOSITORY_NAME provided, is \033[1;32m'"$REPOSITORY_NAME"$'\033[0m good? [Y/n]\n' yn - case $yn in - [Yy]* );; - [Nn]* ) - echo -e "\t> Enter your repository name" - read -r REPOSITORY_NAME - ;; - * ) - echo -e "$USAGE" - exit 1;; - esac -fi - -if [[ -z "$PLUGIN_NAME" ]]; then - DEFAULT_REPOSITORY_NAME=$(echo "$REPOSITORY_NAME" | sed -e "s/\.nvim//") - read -rp $'\t> No PLUGIN_NAME provided, defaulting to \033[1;32m'"$DEFAULT_REPOSITORY_NAME"$'\033[0m, continue? [Y/n]\n' yn - case $yn in - [Yy]* ) - PLUGIN_NAME=$DEFAULT_REPOSITORY_NAME - ;; - [Nn]* ) - echo -e "\t> Enter your plugin name" - read -r PLUGIN_NAME - ;; - * ) - echo -e "$USAGE" - exit 1;; - esac -fi - -echo -e "Username: \033[1;32m$USERNAME\033[0m\nRepository: \033[1;32m$REPOSITORY_NAME\033[0m\nPlugin: \033[1;32m$PLUGIN_NAME\033[0m\n\n\tRenaming placeholder files..." - -rm -rf doc -mv plugin/your-plugin-name.lua "plugin/$PLUGIN_NAME.lua" -mv lua/your-plugin-name "lua/$PLUGIN_NAME" -mv README_TEMPLATE.md README.md - -echo -e "\tReplacing placeholder names..." - -PASCAL_CASE_PLUGIN_NAME=$(echo "$PLUGIN_NAME" | perl -pe 's/(^|-)./uc($&)/ge;s/-//g') - -grep -rl "YourPluginName" .github/ plugin/ tests/ lua/ | xargs sed -i "" -e "s/YourPluginName/$PASCAL_CASE_PLUGIN_NAME/g" -grep -rl "your-plugin-name" README.md .github/ plugin/ tests/ lua/ | xargs sed -i "" -e "s/your-plugin-name/$PLUGIN_NAME/g" -grep -rl "YOUR_GITHUB_USERNAME" README.md .github/ | xargs sed -i "" -e "s/YOUR_GITHUB_USERNAME/$USERNAME/g" -grep -rl "YOUR_REPOSITORY_NAME" README.md .github/ | xargs sed -i "" -e "s/YOUR_REPOSITORY_NAME/$REPOSITORY_NAME/g" - -echo -e "\n\033[1;32mOK.\033[0m" - -echo -e "\tFetching dependencies (tests and documentation generator)..." - -make deps - -echo -e "\n\033[1;32mOK.\033[0m" - -echo -e "\tGenerating docs..." - -make documentation - -echo -e "\n\033[1;32mOK.\033[0m" - -echo -e "\tRunning tests..." - -make test - -echo -e "\n\033[1;32mOK.\033[0m"