Skip to content
This repository was archived by the owner on Nov 27, 2024. It is now read-only.

Commit 0fee943

Browse files
authored
chore: refining-env-file-generator (#71)
* chore: refining-env-file-generator * chore: temp setting algokit from feat branch
1 parent 99af720 commit 0fee943

File tree

31 files changed

+141
-1
lines changed

31 files changed

+141
-1
lines changed

.github/workflows/check-python.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
run: pipx install poetry
1515

1616
- name: Install algokit
17-
run: pipx install git+https://github.com/algorandfoundation/algokit-cli.git@fix/copier-answers-lookup
17+
run: pipx install git+https://github.com/algorandfoundation/algokit-cli.git@chore/patching-tests
1818

1919
- name: Run algokit localnet
2020
run: algokit localnet start

examples/generators/production_beaker_smart_contract_python/.algokit/generators/create_env_file/copier.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,32 @@ custom_network_name:
2424
placeholder: "custom"
2525
when: "{{ not use_generic_env and target_network == 'custom' }}"
2626

27+
is_localnet:
28+
type: bool
29+
help: Whether to deploy on localnet.
30+
placeholder: "true"
31+
default: "{{ target_network == 'localnet' and not use_generic_env }}"
32+
when: 'false'
33+
34+
is_testnet:
35+
type: bool
36+
help: Whether to deploy on testnet.
37+
placeholder: "true"
38+
default: "{{ target_network == 'testnet' and not use_generic_env }}"
39+
when: 'false'
40+
41+
is_mainnet:
42+
type: bool
43+
help: Whether to deploy on mainnet.
44+
placeholder: "true"
45+
default: "{{ target_network == 'mainnet' and not use_generic_env }}"
46+
when: 'false'
47+
48+
is_customnet:
49+
type: bool
50+
help: Whether to deploy on custom network.
51+
placeholder: "true"
52+
default: "{{ target_network == 'custom' and not use_generic_env }}"
53+
when: 'false'
54+
2755
_templates_suffix: ".j2"

examples/generators/production_beaker_smart_contract_typescript/.algokit/generators/create_env_file/copier.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,32 @@ custom_network_name:
2424
placeholder: "custom"
2525
when: "{{ not use_generic_env and target_network == 'custom' }}"
2626

27+
is_localnet:
28+
type: bool
29+
help: Whether to deploy on localnet.
30+
placeholder: "true"
31+
default: "{{ target_network == 'localnet' and not use_generic_env }}"
32+
when: 'false'
33+
34+
is_testnet:
35+
type: bool
36+
help: Whether to deploy on testnet.
37+
placeholder: "true"
38+
default: "{{ target_network == 'testnet' and not use_generic_env }}"
39+
when: 'false'
40+
41+
is_mainnet:
42+
type: bool
43+
help: Whether to deploy on mainnet.
44+
placeholder: "true"
45+
default: "{{ target_network == 'mainnet' and not use_generic_env }}"
46+
when: 'false'
47+
48+
is_customnet:
49+
type: bool
50+
help: Whether to deploy on custom network.
51+
placeholder: "true"
52+
default: "{{ target_network == 'custom' and not use_generic_env }}"
53+
when: 'false'
54+
2755
_templates_suffix: ".j2"

examples/generators/starter_beaker_smart_contract_python/.algokit/generators/create_env_file/copier.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,32 @@ custom_network_name:
2424
placeholder: "custom"
2525
when: "{{ not use_generic_env and target_network == 'custom' }}"
2626

27+
is_localnet:
28+
type: bool
29+
help: Whether to deploy on localnet.
30+
placeholder: "true"
31+
default: "{{ target_network == 'localnet' and not use_generic_env }}"
32+
when: 'false'
33+
34+
is_testnet:
35+
type: bool
36+
help: Whether to deploy on testnet.
37+
placeholder: "true"
38+
default: "{{ target_network == 'testnet' and not use_generic_env }}"
39+
when: 'false'
40+
41+
is_mainnet:
42+
type: bool
43+
help: Whether to deploy on mainnet.
44+
placeholder: "true"
45+
default: "{{ target_network == 'mainnet' and not use_generic_env }}"
46+
when: 'false'
47+
48+
is_customnet:
49+
type: bool
50+
help: Whether to deploy on custom network.
51+
placeholder: "true"
52+
default: "{{ target_network == 'custom' and not use_generic_env }}"
53+
when: 'false'
54+
2755
_templates_suffix: ".j2"

examples/generators/starter_beaker_smart_contract_typescript/.algokit/generators/create_env_file/copier.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,32 @@ custom_network_name:
2424
placeholder: "custom"
2525
when: "{{ not use_generic_env and target_network == 'custom' }}"
2626

27+
is_localnet:
28+
type: bool
29+
help: Whether to deploy on localnet.
30+
placeholder: "true"
31+
default: "{{ target_network == 'localnet' and not use_generic_env }}"
32+
when: 'false'
33+
34+
is_testnet:
35+
type: bool
36+
help: Whether to deploy on testnet.
37+
placeholder: "true"
38+
default: "{{ target_network == 'testnet' and not use_generic_env }}"
39+
when: 'false'
40+
41+
is_mainnet:
42+
type: bool
43+
help: Whether to deploy on mainnet.
44+
placeholder: "true"
45+
default: "{{ target_network == 'mainnet' and not use_generic_env }}"
46+
when: 'false'
47+
48+
is_customnet:
49+
type: bool
50+
help: Whether to deploy on custom network.
51+
placeholder: "true"
52+
default: "{{ target_network == 'custom' and not use_generic_env }}"
53+
when: 'false'
54+
2755
_templates_suffix: ".j2"

template_content/.algokit/generators/create_env_file/copier.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,32 @@ custom_network_name:
2424
placeholder: "custom"
2525
when: "{{ not use_generic_env and target_network == 'custom' }}"
2626

27+
is_localnet:
28+
type: bool
29+
help: Whether to deploy on localnet.
30+
placeholder: "true"
31+
default: "{{ target_network == 'localnet' and not use_generic_env }}"
32+
when: 'false'
33+
34+
is_testnet:
35+
type: bool
36+
help: Whether to deploy on testnet.
37+
placeholder: "true"
38+
default: "{{ target_network == 'testnet' and not use_generic_env }}"
39+
when: 'false'
40+
41+
is_mainnet:
42+
type: bool
43+
help: Whether to deploy on mainnet.
44+
placeholder: "true"
45+
default: "{{ target_network == 'mainnet' and not use_generic_env }}"
46+
when: 'false'
47+
48+
is_customnet:
49+
type: bool
50+
help: Whether to deploy on custom network.
51+
placeholder: "true"
52+
default: "{{ target_network == 'custom' and not use_generic_env }}"
53+
when: 'false'
54+
2755
_templates_suffix: ".j2"

0 commit comments

Comments
 (0)