ACLoong / nba-tall

This project aims to combine the NBA news based on different news title in most famous news platfroms,such as hupu,tencent,sina etc.
BSD 2-Clause "Simplified" License
5 stars 7 forks source link

build.sh about Scrapy System #10

Open MrKingHH opened 6 years ago

MrKingHH commented 6 years ago

What's build.sh script?

I can only write run.sh script about my nbanews scrapy program. Furthermore, i can't ensure the correctnessthis of run.sh.

And i don't konw how to write a build.sh script. More Exactly, i am not clear about the function and the way to build the whole pro of build.sh. So, can u tell me more detials about the build.sh and run.sh if u are free?

@wangqing1218

wangqing1218 commented 6 years ago

@MrKingHH Ok, maybe others also don't understand it well.

Think of following 3 questions:

  1. If you wanna run your project on a node without any dependency, how should we do?
  2. If a follower clones your repository, how does he do next?
  3. How to run your project on CI system?

To solve the 3 questions, we can create some scripts(not only shell scripts, but others like python, etc.) to help us.

In general, we can create a build.sh and run.sh. build.sh helps us to obtain dependencies and build(em, don't tell me you don't know about build) the project. Some cases, build.sh will install some package. If you develop a python package, the build.sh can install it which you want to install. If you do this, when some one clones you repository into his local, he can execute the command build.sh to build the project, and execute the command run.sh to run it.

There are more, we can execute the command run_tests.sh to run unit tests and integration tests; we can execute the command check_format.sh to check our code style, etc.