Skip to content

Add Template Release Script#430

Merged
sorpaas merged 5 commits intomasterfrom
add-release-script
Jul 30, 2021
Merged

Add Template Release Script#430
sorpaas merged 5 commits intomasterfrom
add-release-script

Conversation

@nuke-web3
Copy link
Copy Markdown
Contributor

@nuke-web3 nuke-web3 commented Jul 29, 2021

This is a copy&paste addition to be able to produce a stand-alone template (with local->git dependencies) for the included template here. If this seems like a good addition, we can tune this PR to fit the needs better, update the docs here, and mention the way to use it in the devhub, or if we can commit to maintain it, host a template repo just as we have for the https://github.com/substrate-developer-hub/substrate-node-template already.

@nuke-web3 nuke-web3 requested a review from sorpaas as a code owner July 29, 2021 21:59
@nuke-web3 nuke-web3 requested a review from JesseAbram July 29, 2021 21:59
@sorpaas
Copy link
Copy Markdown
Member

sorpaas commented Jul 29, 2021

If this seems like a good addition, we can tune this PR to fit the needs better, update the docs here, and mention the way to use it in the devhub, or if we can commit to maintain it, host a template repo just as we have for the https://github.com/substrate-developer-hub/substrate-node-template already.

Yeah definitely! I think this also solves the problem of pinning Substrate master for new users as we received many complaints.

@nuke-web3
Copy link
Copy Markdown
Contributor Author

nuke-web3 commented Jul 29, 2021

I can confrim that the script works and the unzipped template builds & runs.

image

Based on the master branch presently (latest commit of this PR) the new Cargo.toml has an not ideal form, but it works:

[dependencies.fc-consensus]
git = 'https://github.com/paritytech/frontier.git'
rev = '2a021f69a2db02106c82c018fac637b647a2b13c'
.......

I will try for the last tag pallet-evm-v4.0.0 as well to see the behavior. Anything else we should test before polishing the instructions for use here?

@nuke-web3
Copy link
Copy Markdown
Contributor Author

Ah one thing I think we should use is a fixed tag/release not a floating branch reference in substrate. So the template here would need to be updated and upstream tags set. Right?

@sorpaas
Copy link
Copy Markdown
Member

sorpaas commented Jul 29, 2021

Ah one thing I think we should use is a fixed tag/release not a floating branch reference in substrate. So the template here would need to be updated and upstream tags set. Right?

We shouldn't use any special tags in cargo.toml. Right now we explicitly set the branch to frontier but even that should be removed shortly, because it turns out cargo interpreta them as different dependencies and will resolve it differently. This makes it incompatible for many projects.

@nuke-web3
Copy link
Copy Markdown
Contributor Author

Well typically we see release tags used, like in the node template: https://github.com/substrate-developer-hub/substrate-node-template/blob/master/node/Cargo.toml#L41-L44

This way (assuming the tag is static) there is only one commit upstream that cargo will use, and it's more human friendly to have the tag & version set.

@sorpaas
Copy link
Copy Markdown
Member

sorpaas commented Jul 29, 2021

This way (assuming the tag is static) there is only one commit upstream that cargo will use, and it's more human friendly to have the tag & version set.

That works if the only git dependencies are directly through the template project. Once you have git dependencies that have git dependencies and both that project and the dependency depends on git substrate, everything will start to break.

@nuke-web3
Copy link
Copy Markdown
Contributor Author

nuke-web3 commented Jul 29, 2021

Assuming this upstream PR lands, we can also introduce this here paritytech/substrate#9461
with #431 in resolved first. Thus we can copy over the style/formatting from frontier to match in the template.

@nuke-web3 nuke-web3 force-pushed the add-release-script branch from e08b409 to 78b9c1f Compare July 30, 2021 19:33
@nuke-web3 nuke-web3 requested a review from sorpaas July 30, 2021 21:44
@sorpaas sorpaas merged commit 76452a7 into master Jul 30, 2021
@sorpaas sorpaas deleted the add-release-script branch July 30, 2021 21:51
abhijeetbhagat pushed a commit to web3labs/frontier that referenced this pull request Jan 11, 2023
* copy substrate template release script

* modified for frontier minimally

* frontier replaces substrate names

* `cargo fmt -p node-template-release -- --config hard_tabs=true`

* spelling, formatting max 100 char lines
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