#!/usr/bin/env bash
# shellcheck disable=SC2211,SC2288,SC2317

# Op using custom types + arrays.
# Depends on types.op.sh being loaded first.

@operation.release.tag() {
  @in.semver version
  @in.datacenter dc

  @out.semver version
  @out.datacenter dc
  @out.string[] targets

  @do() {
    local version
    local dc

    version=$(@in version)
    dc=$(@in dc)

    @out.semver version "$version"
    @out.datacenter dc "$dc"
    @out.string[] targets "${dc}-primary" "${dc}-replica"

    @return.out
  }

  @is-done() {
    return 1
  }
}
