From 2744f3987da4000fd6c86af77f39f0213275bbf3 Mon Sep 17 00:00:00 2001 From: Vladislav Trotsenko Date: Fri, 4 Feb 2022 18:14:14 +0200 Subject: [PATCH] Feature/Add git-flow * Added git-flow * Updated setup.sh * Updated script docs, version, changelog --- CHANGELOG.md | 6 ++++++ README.md | 18 +++++++++++++----- setup.sh | 10 +++++----- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c46549d..cebf78e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.0] - 2022-02-04 + +### Added + +- Added [git-flow](https://github.com/petervanderdoes/gitflow-avh) + ## [0.1.0] - 2022-02-04 ### Added diff --git a/README.md b/README.md index e23a5fb..30eec5f 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,31 @@ # FRS - fast Ruby setup -Automation script for spin-up Ruby developer environment. Configure your developer stuff on Linux Ubuntu in minutes 🚀 +Automation script for spin-up Ruby developer environment. Configure your developer stuff on Linux Ubuntu in minutes 🚀 Focus on development, not on developer tools! ## Features +* Installs & configures [git](https://git-scm.com), [git-flow](https://github.com/petervanderdoes/gitflow-avh) * Installs & configures [ZSH](https://www.zsh.org), [OhMyZsh](https://ohmyz.sh) and [Spaceship Promt](https://spaceship-prompt.sh) * Installs & configures [asdf](https://asdf-vm.com), [asdf Ruby plugin](https://github.com/asdf-vm/asdf-ruby) * Installs & configures latest [MRI Ruby](https://www.ruby-lang.org/en/downloads/releases) with default gems * Installs & configures [Visual Studio Code](https://code.visualstudio.com) -* Configures git ## Requirements/Preconditions -1. Fresh Linux Ubuntu 20.04.3 LTS / Linux Ubuntu 21.10 +1. Fresh `Linux Ubuntu 20.04 LTS` / `Linux Ubuntu 21.10` 2. `wget` system dependency -3. GitHub personal access token. Go to `Github/Settings/Developer settings/Personal access tokens` to create it. +3. GitHub personal access token ## Using +### Create GitHub personal access token + +To create it go to: [`GitHub/Settings/Developer settings/Personal access tokens/New personal access token`](https://github.com/settings/tokens/new). Specify token name and next token scopes: + +* `repo` - full control of private repositories +* `workflow` - update GitHub Action workflows +* `admin:repo_hook` - full control of repository hooks + ### Install wget Open your terminal. Install `wget`: @@ -34,7 +42,7 @@ wget https://raw.githubusercontent.com/RubyWorkout/frs/master/setup.sh ### Run script -Run Fast Ruby Setup script with your email, name (registered on github), github username and github personal access token as position arguments: +Run Fast Ruby Setup script with your email, name (registered on github), github username and github personal access token as positional arguments: ```bash . ./setup.sh johndoe@example.com "John Doe" git_username git_token diff --git a/setup.sh b/setup.sh index 38f607b..2c0e9e5 100644 --- a/setup.sh +++ b/setup.sh @@ -27,12 +27,12 @@ function step_title() { echo "${bold}${green}STEP $1: $2...${reset}" } -# Install ZSH and friends +# Install git, zsh and friends function step_1() { cd ~ - step_title $1 "Installing ZSH, OhMyZsh and Spaceship Promt" + step_title $1 "Installing GIT, ZSH, OhMyZsh and Spaceship Promt" sudo apt update - sudo apt-get install -y git curl wget zsh powerline fonts-powerline software-properties-common apt-transport-https + sudo apt-get install -y git git-flow curl wget zsh powerline fonts-powerline software-properties-common apt-transport-https sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh) --unattended" sudo chsh -s $(which zsh) git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1 @@ -109,7 +109,7 @@ function print_fails_steps { echo "${red}Failed number of step(s): ${joined%,*} ${reset}" } -# Step list iterator +# Steps list iterator for s in $(seq 1 $final_step_index) do ((steps_counter++)) @@ -119,7 +119,7 @@ do fi done -# Final result message +# Print out final result message if [[ ${#bundler_build_errors[@]} == 0 ]] then echo "${green}Congrats, your Ruby developer environment is ready${reset} 🚀"