Skip to content

Commit

Permalink
Feature/Add git-flow (#7)
Browse files Browse the repository at this point in the history
* Added git-flow
* Updated setup.sh
* Updated script docs, version, changelog
  • Loading branch information
bestwebua authored Feb 4, 2022
1 parent 346f920 commit 2023b06
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -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`:
Expand All @@ -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 [email protected] "John Doe" git_username git_token
Expand Down
10 changes: 5 additions & 5 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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++))
Expand All @@ -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} 🚀"
Expand Down

0 comments on commit 2023b06

Please sign in to comment.