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

docs(build): add text build steps for Linux, Mac and Windows #2072

Closed
wants to merge 3 commits into from
Closed

Conversation

AbhinavMir
Copy link

@AbhinavMir AbhinavMir commented Jun 10, 2022

Issue: #1963

Signed-off-by: Abhinav Srivastava (abhinavmir#1898 on Discord)

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@AbhinavMir

  1. apt is only there on Debian and it's downstream distros so I would somehow make it clear and then in separate sections you could detail the steps for Win and Mac so that people don't get confused.
  2. Instead of npm, please use yarn where possible
  3. Do not install the nodejs package via apt (not even on the Debian distros). We strongly encourage/prefer the use of the node version manager tool (nvm)
  4. Let's push people towards JDK 11 instead of JDK 8

Signed-off-by: Abhinav Srivastava <[email protected]>
Signed-off-by: Abhinav Srivastava <[email protected]>
@AbhinavMir
Copy link
Author

have addressed 2,3,4 in latest commit. I think for 1, we can create a new issue to create separate build instructions on Windows and Mac.

### Package structure - Main and Factory Plugin class
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn
Copy link
Contributor

Choose a reason for hiding this comment

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

For yarn, we do have a npm script. One can run this npm script from the cactus root folder, npm run install-yarn

@@ -1,91 +1,91 @@
# Hyperledger Cactus Build Instructions
### Cactus BUILD instruction
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe saying Hyperledger Cactus (instead of just Cactus) here is better.

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin

### Check that the package has been correctly installed
sudo docker run hello-world
Copy link
Contributor

Choose a reason for hiding this comment

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

After this line, reference can also be given to use docker without sudo, as mentioned here, https://docs.docker.com/engine/install/linux-postinstall/

that can be helped by using the `npm run watch` script which can automatically
recompile packages as you modify them (and only the packages that you have
modified, not everything).
You can download and install VS Code from [here](https://code.visualstudio.com/download). It is suggested to install the git-graph and Docker plugins.
Copy link
Contributor

Choose a reason for hiding this comment

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

Here, we can also mention the npm-scripts plugin as well (https://marketplace.visualstudio.com/items?itemName=traBpUkciP.vscode-npm-scripts)

The `npm run watch` script in action:
```
git clone https://github.com/hyperledger/cactus
yarn add
Copy link
Contributor

Choose a reason for hiding this comment

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

We can specify the npm run install-yarn prior toyarn add (yarn-add isn't required)

@AbhinavMir AbhinavMir closed this by deleting the head repository Sep 25, 2022
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.

3 participants