Allow - to define default target
This commit is contained in:
parent
f2fbe8f1f5
commit
3ec2d79cb1
2 changed files with 9 additions and 5 deletions
10
README.md
10
README.md
|
@ -47,13 +47,17 @@ It will check in with the server defined in `/arkdep/config` as `repo_url` and p
|
||||||
### Deploying a specified image version
|
### Deploying a specified image version
|
||||||
A specific image version to pull and deploy can be parsed like so;
|
A specific image version to pull and deploy can be parsed like so;
|
||||||
```shell
|
```shell
|
||||||
sudo arkdep deploy 00ce35074659538f946be77d9efaefc37725335689
|
sudo arkdep deploy arkanelinux 00ce35074659538f946be77d9efaefc37725335689
|
||||||
|
```
|
||||||
|
|
||||||
|
The target name may be substituted with a `-` to pull the default target.
|
||||||
|
```shell
|
||||||
|
sudo arkdep deploy - 00ce35074659538f946be77d9efaefc37725335689
|
||||||
```
|
```
|
||||||
Simply provide the basename of the image and it will attempt to find it in `/database`.
|
|
||||||
|
|
||||||
You do not have to provide the full basename, you can provide it with an impartial basename, the first hit will be pulled and deployed.
|
You do not have to provide the full basename, you can provide it with an impartial basename, the first hit will be pulled and deployed.
|
||||||
```shell
|
```shell
|
||||||
sudo arkdep deploy 00ce
|
sudo arkdep deploy arkanelinux 00ce
|
||||||
```
|
```
|
||||||
|
|
||||||
## Packaging
|
## Packaging
|
||||||
|
|
4
arkdep
4
arkdep
|
@ -266,7 +266,7 @@ deploy () {
|
||||||
|
|
||||||
# target and version are optional, if not defined default to primary as defined in
|
# target and version are optional, if not defined default to primary as defined in
|
||||||
# /arkdep/config and latest
|
# /arkdep/config and latest
|
||||||
if [[ -n $2 ]]; then
|
if [[ -n $2 ]] && [[ $2 != '-' ]]; then
|
||||||
declare -r deploy_target=$2
|
declare -r deploy_target=$2
|
||||||
else
|
else
|
||||||
declare -r deploy_target="$repo_default_image"
|
declare -r deploy_target="$repo_default_image"
|
||||||
|
@ -297,7 +297,7 @@ deploy () {
|
||||||
# Lets ensure the requested image is not already deployed
|
# Lets ensure the requested image is not already deployed
|
||||||
if [[ -e $arkdep_dir/deployments/${data[0]} ]]; then
|
if [[ -e $arkdep_dir/deployments/${data[0]} ]]; then
|
||||||
printf "\e[1;33m<!>\e[0m\e[1m ${data[0]} is already deployed, canceling deployment\e[0m\n"
|
printf "\e[1;33m<!>\e[0m\e[1m ${data[0]} is already deployed, canceling deployment\e[0m\n"
|
||||||
exit 0
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if requested version is already downloaded
|
# Check if requested version is already downloaded
|
||||||
|
|
Loading…
Add table
Reference in a new issue