Last active
December 24, 2019 10:14
-
-
Save Benjamin1021523/0ffa3b05d1a7d00bf7d62c9cfaad86d4 to your computer and use it in GitHub Desktop.
在一台什麼都沒有裝的mac上安裝前後端程式,以及執行細則
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #下載、安裝brew(如果需要 | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
| #安裝git | |
| brew install git | |
| #在終端機上登入個人github帳號 | |
| #下載前後端專案 | |
| git clone https://github.com/104corp/y19fresh-lottery-program | |
| git clone https://github.com/104corp/104-f2e-lottery | |
| #之後分成兩個視窗執行前後端 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd 104-f2e-lottery | |
| #安裝 | |
| git checkout develop | |
| #因為要pull所以這邊也要登入,可以merge到master嗎( | |
| git pull | |
| brew install yarn | |
| yarn install | |
| yarn build | |
| #執行 | |
| yarn start | |
| #停止 | |
| Ctrl C | |
| #在終端機上登出github | |
| #取自https://gist.github.com/richchurcher/531b0452d7d5ea983daa314d0876f60a | |
| echo -e "host=github.com\nprotocol=https\n" | git credential-osxkeychain erase | |
| git config --unset-all user.name | |
| git config --unset-all user.email | |
| #操作結束 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd y19fresh-lottery-program | |
| #安裝 | |
| #安裝前先確認電腦裡是否已經有python3了,不然會出現sudo python3和python3執行的程式不同,尷尬 | |
| brew install python3 | |
| #而且pip還必須用sudo才能執行,更加尷尬 | |
| python3 -m pip install -r requirements.txt | |
| #執行 | |
| python3 main.py | |
| #停止 | |
| Ctrl C | |
| #此時會產生result.csv | |
| #前述產生的result.csv可以使用腳本驗證 | |
| ./check.sh | |
| #測試時,「務必」於執行後清理環境 | |
| ./reset.sh | |
| #後端停止後會產生數個記錄檔,根據情況有可能要把這些記錄上傳到github上 | |
| git config user.name=benjamin1021523 | |
| git config user.email=s1021523@mail.yzu.edu.tw | |
| git add . | |
| git commit -m "2019記錄" | |
| git push origin 2019record | |
| #在終端機上登出github | |
| #取自https://gist.github.com/richchurcher/531b0452d7d5ea983daa314d0876f60a | |
| echo -e "host=github.com\nprotocol=https\n" | git credential-osxkeychain erase | |
| git config --unset-all user.name | |
| git config --unset-all user.email | |
| #操作結束 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment