Skip to content
Snippets Groups Projects
Commit 9dbbe659 authored by Dean Lovett's avatar Dean Lovett
Browse files

fix: added version command

parent 85fe6ee1
No related branches found
No related tags found
No related merge requests found
{
"bumpFiles": [
{
"filename": "NEXUS_TOOLS_VERSION",
"type": "plain-text"
}
]
}
\ No newline at end of file
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [1.0.8](https://gitlab.nexdev.uk///compare/v1.0.7...v1.0.8) (2021-05-16)
### [1.0.7](https://gitlab.nexdev.uk///compare/v1.0.6...v1.0.7) (2021-05-16)
### [1.0.6](https://gitlab.nexdev.uk///compare/v1.0.5...v1.0.6) (2021-05-16)
### [1.0.5](https://gitlab.nexdev.uk///compare/v1.0.4...v1.0.5) (2021-05-16)
### [1.0.4](https://gitlab.nexdev.uk///compare/v1.0.3...v1.0.4) (2021-05-16)
### [1.0.3](https://gitlab.nexdev.uk///compare/v1.0.2...v1.0.3) (2021-05-16)
### [1.0.2](https://gitlab.nexdev.uk///compare/v1.0.1...v1.0.2) (2021-05-16)
### 1.0.1 (2021-05-16)
### Bug Fixes
* added new update and install command ([7c4a3b0](https://gitlab.nexdev.uk///commit/7c4a3b02da4054ab5004bf88f624b754594b21d3))
* fixed update ([85fe6ee](https://gitlab.nexdev.uk///commit/85fe6ee1dbb225af297cbe8727abba0e2349d3ac))
1.0.2
\ No newline at end of file
nexus-tools # Nexus Tools
Useful CLI tool for running our docker-compose stacks, code quality and other development tools.
## Install
To install the nexus development tools, run the following one-line command:
```shell
wget -O - https://gitlab.nexdev.uk/pub/nexus-tools/-/raw/master/install.sh | bash
```
### Manual Install
To install the tools manually, `run.sh` from this repo needs to be placed somewhere on your machine, allowed to be executed and your `.bashrc` file needs updating with the following alias:
```shell
alias nexus="~/nexus-tools/nexus-tools.sh"
```
## Usage
To run the tools, the `nexus` command is used:
```shell
~$ nexus -h
Nexus Mods Development Tools
commands:
down Stops a docker-compose service
up Starts a docker-compose service in the background
build Builds the local image(s) for a docker-compose service. Allows docker-compose build arguments
restart Stops and then starts a docker-compose service
rebuild Stops, builds and then starts a docker-compose service
cq, code-quality Runs the nexus code quality tool
gu, gemfile-updater Runs the gemfile updater tool, outputting common gemfiles in the console
bu, bundle-update Mounts the Gemfile and lockfile and runs bundle update.
update Updates this script to the latest version.
-h, --help show brief help
```
## Uninstalling tool
If the tool was installed automatically, the script can be deleted from ```~/nexus-tools```, and the .bashrc file can be updated to remove the `nexus` alias.
\ No newline at end of file
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
set -e set -e
wget https://gitlab.nexdev.uk/pub/nexus-tools/-/raw/master/run.sh -O ~/nexus-tools.sh wget https://gitlab.nexdev.uk/pub/nexus-tools/-/raw/master/run.sh -O ~/nexus-tools/nexus-tools.sh
wget https://gitlab.nexdev.uk/pub/nexus-tools/-/raw/master/NEXUS_TOOLS_VERSION -O ~/nexus-tools/VERSION
chmod +x ~/nexus-tools.sh chmod +x ~/nexus-tools/nexus-tools.sh
echo 'alias nexus="~/nexus-tools.sh"' >> ~/.bashrc echo 'alias nexus="~/nexus-tools/nexus-tools.sh"' >> ~/.bashrc
\ No newline at end of file \ No newline at end of file
...@@ -2,9 +2,8 @@ ...@@ -2,9 +2,8 @@
set -e set -e
case "$1" in display_help() {
-h|--help) echo "Nexus Mods Development Tools"
echo "Nexus Mods Development Tools"
echo " " echo " "
echo "commands:" echo "commands:"
echo "down Stops a docker-compose service" echo "down Stops a docker-compose service"
...@@ -15,8 +14,14 @@ case "$1" in ...@@ -15,8 +14,14 @@ case "$1" in
echo "cq, code-quality Runs the nexus code quality tool" echo "cq, code-quality Runs the nexus code quality tool"
echo "gu, gemfile-updater Runs the gemfile updater tool, outputting common gemfiles in the console" echo "gu, gemfile-updater Runs the gemfile updater tool, outputting common gemfiles in the console"
echo "bu, bundle-update Mounts the Gemfile and lockfile and runs bundle update." echo "bu, bundle-update Mounts the Gemfile and lockfile and runs bundle update."
echo "version Outputs the current version of this tool"
echo "update Updates this script to the latest version." echo "update Updates this script to the latest version."
echo "-h, --help show brief help" echo "-h, --help show brief help"
}
case "$1" in
-h|--help)
display_help
exit 0 exit 0
;; ;;
down) down)
...@@ -48,9 +53,17 @@ case "$1" in ...@@ -48,9 +53,17 @@ case "$1" in
docker run -it -v "$(pwd)":/app -v /usr/local/bundle:/usr/local/bundle gitlab.nexdev.uk:5555/pub/bundle-updater:v1.0.1 "$@" docker run -it -v "$(pwd)":/app -v /usr/local/bundle:/usr/local/bundle gitlab.nexdev.uk:5555/pub/bundle-updater:v1.0.1 "$@"
echo "Container now must be rebuilt!" echo "Container now must be rebuilt!"
;; ;;
version)
shift
version=`cat ~/nexus-tools/NEXUS_TOOLS_VERSION`
echo "$value"
;;
update) update)
shift shift
echo "Downloading new version" echo "Downloading new version"
wget https://gitlab.nexdev.uk/pub/nexus-tools/-/raw/master/run.sh -O ~/nexus-tools.sh wget https://gitlab.nexdev.uk/pub/nexus-tools/-/raw/master/run.sh -O ~/nexus-tools.sh
;; ;;
*)
display_help
;;
esac esac
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment