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

Failed to source "" script error when running "gtm weekly-report" #76

Open
trygub opened this issue Feb 10, 2015 · 1 comment
Open

Failed to source "" script error when running "gtm weekly-report" #76

trygub opened this issue Feb 10, 2015 · 1 comment

Comments

@trygub
Copy link

trygub commented Feb 10, 2015

gtm weekly-report
/home/semen/bin/gtm: line 576: : No such file or directory
Failed to source '' script

Line 576 is the last line in this code snipped:

# file with projects map and format options
file=""
[[ "$1" =~ --projects ]] && file=${2:?"Expected projects map file!"} && shift 2
source "$file"
@laughedelic
Copy link
Owner

Hi, the problem here is that you need a configuration file listing projects that you want to generate this report for. Sorry that it's not obvious from the help 😅. Here is an example of such config:

#!/bin/bash

# I have all my projects in one place then located in org-name/repo-name subfolders
prefix="/Users/laughedelic/dev"

# here we define a function that dispatches projects
function project() {
case $1 in

# "scala" project: first line in the heading for this project, then a list of repositories
scala) echo """Scala_tools
ohnosequences/statika
ohnosequences/cosas
""" ;;

general) echo """General
ohnosequences/sbt-s3-resolver
ohnosequences/sbt-github-release
ohnosequences/nice-sbt-settings
laughedelic/literator
""" ;;

confs) echo """Conferences
bio4j/FOSDEM-2014
ohnosequences/IWBBIO-2014
laughedelic/biss2014
ohnosequences/JdBI2014
"""
esac
}

# this is just the list of projects you want to generate report for
# in the function above you can define all you projects, 
# but here choose only some of them and in particular order
projects=(
scala
confs
general
)

# this is optional, just tuning the format of the output:
week_format='## %s \n\n'
project_format='### %s \n\n'
repo_format='#. [_repo_](https://github.com/_repo_) \n'
commit_format='    + `[%h]` `_time_` — %s'
total_format='\n    In total: _human_time_\n'

And yes, I should improve this command, so that without config it generates report just for the current repository...

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

No branches or pull requests

2 participants