Skip to content

Commit

Permalink
add buttons to readme regardless of project being a repo at 19:29 of …
Browse files Browse the repository at this point in the history
…2020-07-31
  • Loading branch information
nrobinson2000 committed Jul 31, 2020
1 parent c8011dd commit a29ad7c
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions bin/neopo
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def installOrUpdate(install, force):
forceInstall = force == "-f"
print("Installing neopo..." if install else "Updating dependencies...")

# Dependencies we wish to install anc caches we will create
# Dependencies we wish to install and caches we will create
dependencies = ["compilers", "tools", "scripts", "debuggers"]
caches = ["firmware", "platforms", "toolchains", "compilers"]

Expand Down Expand Up @@ -392,27 +392,25 @@ def create(path, name):
if returncode:
raise ProcessError("Failed with code " + str(returncode))

# If git is installed, initialize project as git repo and make customizations
# If git is installed, initialize project as git repo
if shutil.which("git"):
subprocess.run(["git", "init", projectPath])

# Add .travis.yml to project
writeFile(TRAVIS_YML, os.path.join(projectPath, ".travis.yml"), "w")

# Add .gitignore to project
writeFile("target", os.path.join(projectPath, ".gitignore"), "w")

# Add buttons to README.md
travisButton = "[![](https://api.travis-ci.org/yourUser/yourRepo.svg?branch=master)](https://travis-ci.org/yourUser/yourRepo)"
neopoButton = "[![](https://img.shields.io/badge/built_with-neopo-informational)](https://nrobinson2000.github.io/neopo)"
readmePath = os.path.join(projectPath, "README.md")
with open(readmePath, "r") as file:
readme = file.readlines()
readme.insert(0, "\n")
readme.insert(0, neopoButton + "\n")
readme.insert(0, travisButton + "\n")
with open(readmePath, "w") as file:
file.writelines(readme)
# Add buttons to README.md
travisButton = "[![](https://api.travis-ci.org/yourUser/yourRepo.svg?branch=master)](https://travis-ci.org/yourUser/yourRepo)"
neopoButton = "[![](https://img.shields.io/badge/built_with-neopo-informational)](https://nrobinson2000.github.io/neopo)"
readmePath = os.path.join(projectPath, "README.md")
with open(readmePath, "r") as file:
readme = file.readlines()
readme.insert(0, "\n")
readme.insert(0, neopoButton + "\n")
readme.insert(0, travisButton + "\n")
with open(readmePath, "w") as file:
file.writelines(readme)

# Change name/src/name.ino to name/src/name.cpp
# Add #include "Particle.h"
Expand Down

0 comments on commit a29ad7c

Please sign in to comment.