diff options
| -rw-r--r-- | src/blogc-github-lambda/lambda_function.py | 6 | ||||
| -rw-r--r-- | src/blogc-make/main.c | 12 | ||||
| -rwxr-xr-x | tests/blogc-make/check_blogc_make.sh.in | 28 | 
3 files changed, 23 insertions, 23 deletions
diff --git a/src/blogc-github-lambda/lambda_function.py b/src/blogc-github-lambda/lambda_function.py index b845285..9798055 100644 --- a/src/blogc-github-lambda/lambda_function.py +++ b/src/blogc-github-lambda/lambda_function.py @@ -148,11 +148,11 @@ def lambda_handler(event, context):          env['OUTPUT_DIR'] = '_build_lambda'          rootdir = get_tarball(payload['repository']['full_name']) -        settings_file = os.path.join(rootdir, 'settings.ini') +        blogcfile = os.path.join(rootdir, 'blogcfile') -        if os.path.isfile(settings_file): +        if os.path.isfile(blogcfile):              # deploy using blogc-make -            args = [os.path.join(cwd, 'blogc'), '-m', '-f', settings_file, +            args = [os.path.join(cwd, 'blogc'), '-m', '-f', blogcfile,                      'all']              if debug:                  args.append('-V') diff --git a/src/blogc-make/main.c b/src/blogc-make/main.c index bc8c926..6f5d040 100644 --- a/src/blogc-make/main.c +++ b/src/blogc-make/main.c @@ -36,7 +36,7 @@ print_help(void)          "    -h            show this help message and exit\n"          "    -v            show version and exit\n"          "    -V            be verbose when executing commands\n" -        "    -f FILE       settings file (default: settings.ini)\n"); +        "    -f FILE       read FILE as blogcfile\n");      bm_rule_print_help();  } @@ -62,7 +62,7 @@ main(int argc, char **argv)      bc_slist_t *rules = NULL;      bool verbose = false; -    char *settings_file = NULL; +    char *blogcfile = NULL;      bm_ctx_t *ctx = NULL;      for (unsigned int i = 1; i < argc; i++) { @@ -79,9 +79,9 @@ main(int argc, char **argv)                      break;                  case 'f':                      if (argv[i][2] != '\0') -                        settings_file = bc_strdup(argv[i] + 2); +                        blogcfile = bc_strdup(argv[i] + 2);                      else if (i + 1 < argc) -                        settings_file = bc_strdup(argv[++i]); +                        blogcfile = bc_strdup(argv[++i]);                      break;  #ifdef MAKE_EMBEDDED                  case 'm': @@ -105,7 +105,7 @@ main(int argc, char **argv)          rules = bc_slist_append(rules, bc_strdup("all"));      } -    ctx = bm_ctx_new(settings_file ? settings_file : "settings.ini", &err); +    ctx = bm_ctx_new(blogcfile ? blogcfile : "blogcfile", &err);      if (err != NULL) {          bc_error_print(err, "blogc-make");          rv = 3; @@ -117,7 +117,7 @@ main(int argc, char **argv)  cleanup:      bc_slist_free_full(rules, free); -    free(settings_file); +    free(blogcfile);      bm_ctx_free(ctx);      bc_error_free(err); diff --git a/tests/blogc-make/check_blogc_make.sh.in b/tests/blogc-make/check_blogc_make.sh.in index 2139664..9993a22 100755 --- a/tests/blogc-make/check_blogc_make.sh.in +++ b/tests/blogc-make/check_blogc_make.sh.in @@ -19,7 +19,7 @@ mkdir -p "${TEMP}"/proj{,/templates,/content/post}  ### minimal settings, will produce no file -cat > "${TEMP}/proj/settings.ini" <<EOF +cat > "${TEMP}/proj/blogcfile" <<EOF  [environment]  AUTHOR_NAME = Lol  AUTHOR_EMAIL = author@example.com @@ -28,7 +28,7 @@ SITE_TAGLINE = WAT?!  BASE_DOMAIN = http://example.org  EOF -${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/settings.ini" 2>&1 +${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/blogcfile" 2>&1  ### default settings with some posts @@ -58,13 +58,13 @@ Listing: {% ifdef FILTER_TAG %}{{ FILTER_TAG }} - {% endif %}{{ TITLE }} - {{ DA  {% endblock %}  EOF -cat >> "${TEMP}/proj/settings.ini" <<EOF +cat >> "${TEMP}/proj/blogcfile" <<EOF  [posts]  foo  bar  EOF -${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/settings.ini" 2>&1 | tee "${TEMP}/output.txt" +${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt"  grep "_build/index\\.html" "${TEMP}/output.txt"  grep "_build/atom\\.xml" "${TEMP}/output.txt"  grep "_build/page/1/index\\.html" "${TEMP}/output.txt" @@ -165,14 +165,14 @@ TAGS: tag1 tag2  This is baz.  EOF -cat >> "${TEMP}/proj/settings.ini" <<EOF +cat >> "${TEMP}/proj/blogcfile" <<EOF  baz  [tags]  tag1  tag2  EOF -${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/settings.ini" 2>&1 | tee "${TEMP}/output.txt" +${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt"  grep "_build/index\\.html" "${TEMP}/output.txt"  grep "_build/atom\\.xml" "${TEMP}/output.txt"  grep "_build/atom/tag1\\.xml" "${TEMP}/output.txt" @@ -369,13 +369,13 @@ TITLE: Page 2  This is page 2.  EOF -cat >> "${TEMP}/proj/settings.ini" <<EOF +cat >> "${TEMP}/proj/blogcfile" <<EOF  [pages]  page1  page2  EOF -${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/settings.ini" 2>&1 | tee "${TEMP}/output.txt" +${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt"  grep "_build/index\\.html" "${TEMP}/output.txt"  grep "_build/atom\\.xml" "${TEMP}/output.txt"  grep "_build/atom/tag1\\.xml" "${TEMP}/output.txt" @@ -459,7 +459,7 @@ Listing: {% ifdef FILTER_TAG %}{{ FILTER_TAG }} - {% endif %}{{ TITLE }} - {{ DA  {% endblock %}  EOF -cat > "${TEMP}/proj/settings.ini" <<EOF +cat > "${TEMP}/proj/blogcfile" <<EOF  [settings]  content_dir = contents  template_dir = temp @@ -490,7 +490,7 @@ foo  bar  EOF -${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/settings.ini" 2>&1 | tee "${TEMP}/output.txt" +${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt"  grep "_blogc_build/posts\\.html" "${TEMP}/output.txt"  grep "_blogc_build/atoom/index\\.xml" "${TEMP}/output.txt"  grep "_blogc_build/pagination/1\\.html" "${TEMP}/output.txt" @@ -584,14 +584,14 @@ TAGS: tag1 tag2  This is baz.  EOF -cat >> "${TEMP}/proj/settings.ini" <<EOF +cat >> "${TEMP}/proj/blogcfile" <<EOF  baz  [tags]  tag1  tag2  EOF -${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/settings.ini" 2>&1 | tee "${TEMP}/output.txt" +${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt"  grep "_blogc_build/posts\\.html" "${TEMP}/output.txt"  grep "_blogc_build/atoom/index\\.xml" "${TEMP}/output.txt"  grep "_blogc_build/atoom/tag1/index\\.xml" "${TEMP}/output.txt" @@ -731,13 +731,13 @@ TITLE: Page 2  This is page 2.  EOF -cat >> "${TEMP}/proj/settings.ini" <<EOF +cat >> "${TEMP}/proj/blogcfile" <<EOF  [pages]  page1  page2  EOF -${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/settings.ini" 2>&1 | tee "${TEMP}/output.txt" +${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt"  grep "_blogc_build/posts\\.html" "${TEMP}/output.txt"  grep "_blogc_build/atoom/index\\.xml" "${TEMP}/output.txt"  grep "_blogc_build/atoom/tag1/index\\.xml" "${TEMP}/output.txt"  | 
