Skip to content

Conversation

@arm4b
Copy link
Contributor

@arm4b arm4b commented Aug 10, 2022

In v2.0.0 the use of $ENVIRONMENT var was deprecated in favor of $BITOPS_ENVIRONMENT.
The documentation is still having the old variable references.

This PR fixes it.


@mickmcgrath13 @ccapell @PhillypHenning Another question is what to do with the example projects under the docs https://github.com/bitovi/bitops/tree/main/docs/examples as they might be relying on v1.0 env variables and configuration.
Do we want to rename those too or more verifications on compatibility with v2 needed?

@arm4b arm4b added the documentation 📗 Improvements or additions to documentation label Aug 10, 2022
@arm4b arm4b mentioned this pull request Aug 10, 2022
1 task
@mickmcgrath13
Copy link
Contributor

mickmcgrath13 commented Aug 11, 2022

@armab

Another question is what to do with the example projects under the docs https://github.com/bitovi/bitops/tree/main/docs/examples as they might be relying on v1.0 env variables and configuration.
Do we want to rename those too or more verifications on compatibility with v2 needed?

I see 3 options:

  1. Update the examples to be v2 compatible
  2. rename the examples to be prefixed with v1 (this is blog implications as many blogs link to many of the dirs)
  3. Update BitOps V2 to be backwards compatible with V1 (i.e. deprecate $ENVIRONMENT rather than straight remove it)

I think i'm in favor of 3. It should be a simple:

if [ -z "$BITOPS_ENVIRONMENT" ]; then
  if [ -n "$ENVIRONMENT" ]; then
    echo "ENVIRONMENT deprecated. Use BITOPS_ENVIRONMENT instead."
    export BITOPS_ENVIRONEMT="$ENVIRONMENT"
  else
    echo "BITOPS_ENVIORNMENT required"
    exit 1
  fi
fi

@ccapell
Copy link
Contributor

ccapell commented Aug 11, 2022

@mickmcgrath13 The examples are updated in #272

@arm4b arm4b merged commit 59e35cf into main Aug 11, 2022
@arm4b arm4b deleted the fix/docs-environment branch August 11, 2022 15:00
@mickmcgrath13
Copy link
Contributor

@ccapell there are other examples that @armab is referring to here:
https://github.com/bitovi/bitops/tree/main/docs/examples

These examples were primarily (if not entirely) created for V1 and might need updating as well. I think the deprecation approach is a good one, and we can upgrade them to all be v2 compatible in time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation 📗 Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants