Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement function to create build spec for parachain #36

Merged
merged 5 commits into from
Nov 3, 2023

Conversation

shanithkk
Copy link
Collaborator

Description:

implement function to create build spec for parachain

Commit Message

feat: implement function to create build spec for parachain

see the guidelines for commit messages.

Checklist:

  • I have performed a self-review of my own code
  • I have documented my code in accordance with the documentation guidelines
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have run the unit tests
  • I only have one commit (if not, squash them into one commit).
  • I have a descriptive commit message that adheres to the commit message guidelines

Please review the CONTRIBUTING.md file for detailed contributing guidelines.

constant = import_module("../package_io/constant.star")

def create_parachain_build_spec_with_para_id(plan, image, binary, chain_name, para_id):
command = ExecRecipe(command = ["bin/sh", "-c", "{0} build-spec --chain={1} --disable-default-bootnode > /tmp/{1}.json".format(binary, chain_name)])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formating


build_spec.create_edit_and_build_spec(plan, constant.PLAIN_BUILD_SPEC, image, chain_name, command, build_file = None)

command = ExecRecipe(command = ["bin/sh", "-c", "sed -e 's/\"parachainId\": *[0-9]\\+/\"parachainId\": {0}/' -e 's/\"para_id\": [0-9]*,/\"para_id\": {0},/' -e 's/\"paraId\": [0-9]*,/\"paraId\": {0},/' /build/{1}.json > /tmp/{1}.json".format(para_id, chain_name)])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formating

parachain/parachain.star Show resolved Hide resolved
@shreyasbhat0 shreyasbhat0 merged commit 399b7ed into main Nov 3, 2023
1 check passed
@shreyasbhat0 shreyasbhat0 deleted the DIVE-284-create-build-spec-for-parachain branch November 3, 2023 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants