Skip to content

Commit

Permalink
Rename project (back) to shipper
Browse files Browse the repository at this point in the history
Restore the project's original name, Shipper.
  • Loading branch information
mat128 committed Nov 11, 2022
1 parent f70738b commit ea196f6
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
prerelease: false
files: |
LICENSE
out/purpleship.sh
out/shipper.sh
6 changes: 3 additions & 3 deletions CONFIG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Purpleship configuration
# Shipper configuration

By default, purpleship reads a configuration file located at `$HOME/.purpleshiprc`.
The path to this file can be controlled with the environment variable `PURPLESHIP_RC`.
By default, shipper reads a configuration file located at `$HOME/.shipperrc`.
The path to this file can be controlled with the environment variable `SHIPPER_RC`.

## Options
### image_namespace
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.PHONY: all clean

all: out/purpleship.sh
all: out/shipper.sh

clean:
rm -rf out/

out/purpleship.sh: out
./build_bundle.sh out/purpleship.sh
out/shipper.sh: out
./build_bundle.sh out/shipper.sh

out:
mkdir out
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Purpleship.sh
# Shipper

Simple container deployment tool based on Docker and Docker Compose.

## Usage
Invoke purpleship with the path to a shipping label
Invoke shipper with the path to a shipping label

$ ship.sh <shipping_label>

Expand All @@ -16,17 +16,17 @@ Some example shipping labels are provided in the `examples` directory.

## Configuration

Purpleship can be configured using a `.purpleshiprc` file. The file must be located in the working directory.
Additionally, a global configuration file can be placed in `$HOME/.purpleshiprc`.
Shipper can be configured using a `.shipperrc` file. The file must be located in the working directory.
Additionally, a global configuration file can be placed in `$HOME/.shipperrc`.
The global configuration file will be used as a fallback.

$ cat $HOME/.purpleshiprc
$ cat $HOME/.shipperrc
image_namespace=demo
image_registry_url=images.demo.example.com

The path to the global configuration file can also be controlled via the `PURPLESHIP_RC` environment variable.
The path to the global configuration file can also be controlled via the `SHIPPER_RC` environment variable.

$ export PURPLESHIP_RC=/opt/demo/.purpleshiprc
$ export SHIPPER_RC=/opt/demo/.shipperrc
$ ship.sh examples/basic

See `CONFIG.md` for all configuration options.
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-image-registry/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ version: '3'

services:
httpd:
image: images.purpleship.example.com/purpleship/httpd:1.1
image: images.shipper.example.com/shipper/httpd:1.1
16 changes: 8 additions & 8 deletions src/config.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/bin/bash

GLOBAL_PURPLESHIP_RC="${PURPLESHIP_RC:-$HOME/.purpleshiprc}"
LOCAL_PURPLESHIP_RC=".purpleshiprc"
GLOBAL_SHIPPER_RC="${SHIPPER_RC:-$HOME/.shipperrc}"
LOCAL_SHIPPER_RC=".shipperrc"

_config() {
local key=$1
local default=$2

local value
if test -f "${LOCAL_PURPLESHIP_RC}"; then
value=$(grep "^${key}=" "${LOCAL_PURPLESHIP_RC}" | cut -d'=' -f2)
if test -f "${LOCAL_SHIPPER_RC}"; then
value=$(grep "^${key}=" "${LOCAL_SHIPPER_RC}" | cut -d'=' -f2)
fi

if [ "$value" == "" ] && test -f "${GLOBAL_PURPLESHIP_RC}"; then
value=$(grep "^${key}=" "${GLOBAL_PURPLESHIP_RC}" | cut -d'=' -f2)
if [ "$value" == "" ] && test -f "${GLOBAL_SHIPPER_RC}"; then
value=$(grep "^${key}=" "${GLOBAL_SHIPPER_RC}" | cut -d'=' -f2)
fi

if [ "$value" == "" ]; then
Expand All @@ -24,9 +24,9 @@ _config() {
}

config_image_namespace() {
_config "image_namespace" "purpleship"
_config "image_namespace" "shipper"
}

config_image_registry_url() {
_config "image_registry_url" "registry.purpleship.internal"
_config "image_registry_url" "registry.shipper.internal"
}

0 comments on commit ea196f6

Please sign in to comment.