File tree 3 files changed +18
-1
lines changed
3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -8,11 +8,18 @@ TSCFLAGS=--strict \
8
8
--noUnusedParameters \
9
9
--noImplicitReturns \
10
10
--noFallthroughCasesInSwitch
11
+ GITHUB_PATH =$(shell ./scripts/github-path.sh)
12
+ COMMIT_ID =$(shell git rev-parse HEAD)
11
13
12
14
all : remarks.html
13
15
14
16
remarks.html : remarks.tmpl.html LICENSE remarks.css remarks.js Makefile
15
- cpp $(CPPFLAGS ) -P $< $@
17
+ cpp $(CPPFLAGS ) \
18
+ -D" GITHUB_PATH=$( GITHUB_PATH) " \
19
+ -D" GITHUB_HREF=\" https://github.com/$( GITHUB_PATH) \" " \
20
+ -D" COMMIT_ID=$( COMMIT_ID) " \
21
+ -D" COMMIT_HREF=\" https://github.com/$( GITHUB_PATH) /commit/$( COMMIT_ID) \" " \
22
+ -P $< $@
16
23
17
24
remarks.js : remarks.ts Makefile
18
25
tsc $(TSCFLAGS ) $<
Original file line number Diff line number Diff line change 11
11
</ head >
12
12
< body >
13
13
< div id ="judgements "> </ div >
14
+ < div id ="github ">
15
+ Made from < a href =GITHUB_HREF > GITHUB_PATH</ a > , commit < a
16
+ href =COMMIT_HREF > COMMIT_ID</ a > .
17
+ </ div >
14
18
< script type ="text/javascript ">
15
19
#include "remarks.js"
16
20
</ script >
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -euo pipefail
4
+
5
+ git remote get-url origin | \
6
+ sed ' s/^git@github.com:\(.*\)\.git$/\1/'
You can’t perform that action at this time.
0 commit comments