Skip to content

dmascot/tools

Repository files navigation

dmascot docker-image docker-readme

Tools

Purpose

Automate installation and configuration of development tools which we will using in various educational projects

Supported Platforms

  • Liux
  • MacOS
  • Windows 10/11

Pre-requisite

setup script needs following pre-requisites on your system

Linux/Mac OS

  • Posix Shell

    • working supported Posix Shell i.e. Bash or Zsh
    • git command
    • envsubst command ( via gettext )
  • Fish Shell

    • Fish Shell
    • git command
    • bass (to enable running bash script in fish)

Windows 10/11

  • powershell 7.x

Tools list

Following is the list of tools that the setup script will install

Linux/Mac OS

  • NVM
  • git_bash_prompt/git_zsh_prompt
  • pyenv with virtualenv plugin

Windows

  • NVM
  • posh-git
  • pyenv-win i.e. pyenv for windows

Web Install

If you want to web install, You must have git installed before using Web Install and, have powershell 7.x in case of windows

Linux/Mac OS

Posix Shell

curl https://raw.githubusercontent.com/dmascot/tools/main/install.sh | $SHELL

Fish Shell

curl https://raw.githubusercontent.com/dmascot/tools/main/install.fish | fish

Windows OS

PowerShell

You need to run Powershell as an Administrator, or you might see some errors regarding setting up environment variables

Check Powershell version

$PSVersionTable.PSVersion.Major

make sure it prints 7 or higher number and once again, make sure git is already installed on your system

Enable script execution

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser

Execute WebInstall command

iex (iwr 'https://raw.githubusercontent.com/dmascot/tools/dev/install.ps1').Content

Manual Install

Linux/Mac OS

Posix Shell

./setup.sh

Fish Shell

./setup.fish

Windows

You need to run Powershell as an Administrator, or you might see some errors regarding setting up environment variables

Allow scripts to be executed

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser

Execute setup script

.\setup.ps1

Tests


Pre-requesites

Note that,this is in addition to pre-requisite listed above to be able to run tests

Linux/Mac OS

Posix Shell

  • shellspec: Use this link to find how to install shellspec and learn more about it

Fish Shell

No testing

Windows

You need to run Powershell as an Administrator, or you might see some errors regarding setting up environment variables

Enable script execution

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser

Install / Update Pester module

Install-Moudle -Name Pester -Force -SkipPublisherCheck

Running tests

Linux/Mac OS

Posix Shell

NOTE: shellspec needs access to only /tmp directory which should be there by default if not, it will fail to run test in an unpredictable manner

./run_tests.sh

Windows

  • WARNING: Executing test will install the tools, so if you are planning to run only tests, run 'em in some disposable instance such as VM

  • It is desired that user is part of Administrators group and, all pre-requisites are installed before running tests

    > .\run_tests.ps1

Todo

Windows OS

  • check powershell version
  • enable git install in WebInstall method

Linux OS

  • Fish Shell Support
  • user creation
  • hostname update
  • Docker image build support
  • Extra tools
    • keychain to load ssh key
    • script to mount windows share (useful on VM with windows host)
    • workspace mount script ( useful for WSL or Linux storing code on separate partition)
  • Setup options to choose if user wants to create new user,update hostname , install extra tools etc
  • Web install script
  • KCov for codecoverage