Skip to content

Instantly share code, notes, and snippets.

@adaiguoguo
Created March 19, 2015 02:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adaiguoguo/5cbbef6f8bc77c4e620f to your computer and use it in GitHub Desktop.
Save adaiguoguo/5cbbef6f8bc77c4e620f to your computer and use it in GitHub Desktop.
reponame = os.environ['GERRIT_PROJECT']
repo = reponame.replace('/','-')
print repo
file=open('sonar-project.properties','w')
s='''sonar.projectKey='''+repo+'''\nsonar.projectName='''+repo+'''\nsonar.projectVersion=1.0\nsonar.sources=.\nsonar.sourceEncoding=UTF-8'''
file.write(s)
file.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment