Skip to content

Commit

Permalink
chore: removing hardcoded env var loading for localnet (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
aorumbayev authored Apr 9, 2024
1 parent a51e6ae commit 8a623ee
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
)
logger = logging.getLogger(__name__)
logger.info("Loading .env")
# For manual script execution (bypassing `algokit project deploy`) with a custom .env,
# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`.
load_dotenv()
load_dotenv(".env.localnet")
root_path = Path(__file__).parent


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
)
logger = logging.getLogger(__name__)
logger.info("Loading .env")
# For manual script execution (bypassing `algokit project deploy`) with a custom .env,
# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`.
load_dotenv()
load_dotenv(".env.localnet")
root_path = Path(__file__).parent


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
)
logger = logging.getLogger(__name__)
logger.info("Loading .env")
# For manual script execution (bypassing `algokit project deploy`) with a custom .env,
# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`.
load_dotenv()
load_dotenv(".env.localnet")
root_path = Path(__file__).parent


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
)
logger = logging.getLogger(__name__)
logger.info("Loading .env")
# For manual script execution (bypassing `algokit project deploy`) with a custom .env,
# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`.
load_dotenv()
load_dotenv(".env.localnet")
root_path = Path(__file__).parent


Expand Down
3 changes: 2 additions & 1 deletion examples/production_beaker/smart_contracts/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
)
logger = logging.getLogger(__name__)
logger.info("Loading .env")
# For manual script execution (bypassing `algokit project deploy`) with a custom .env,
# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`.
load_dotenv()
load_dotenv(".env.localnet")
root_path = Path(__file__).parent


Expand Down
3 changes: 2 additions & 1 deletion examples/starter_beaker/smart_contracts/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
)
logger = logging.getLogger(__name__)
logger.info("Loading .env")
# For manual script execution (bypassing `algokit project deploy`) with a custom .env,
# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`.
load_dotenv()
load_dotenv(".env.localnet")
root_path = Path(__file__).parent


Expand Down
3 changes: 2 additions & 1 deletion template_content/smart_contracts/__main__.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ logging.basicConfig(
)
logger = logging.getLogger(__name__)
logger.info("Loading .env")
# For manual script execution (bypassing `algokit project deploy`) with a custom .env,
# modify `load_dotenv()` accordingly. For example, `load_dotenv('.env.localnet')`.
load_dotenv()
load_dotenv(".env.localnet")
root_path = Path(__file__).parent


Expand Down

0 comments on commit 8a623ee

Please sign in to comment.