Skip to content
This repository was archived by the owner on Apr 18, 2020. It is now read-only.

Commit 8e03550

Browse files
committed
Reverted changes, found error: typo
1 parent b8d1707 commit 8e03550

6 files changed

Lines changed: 5 additions & 53 deletions

File tree

modules/status/lambda/Makefile

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,5 @@
1717
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1818
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1919
# IN THE SOFTWARE.
20-
#
21-
include ../../../share/lambda/Makefile
22-
23-
# -----------------------------------------------------------------------------
24-
# Targets
25-
# -----------------------------------------------------------------------------
26-
27-
# Inline badges, because Lambda cannot read from the file system
28-
%.ts: %.svg
29-
@ echo "export = \"$(shell cat $< | sed 's/"/\\\\\\"/g')\"" > $@
3020

31-
# -----------------------------------------------------------------------------
32-
# Hooks
33-
# -----------------------------------------------------------------------------
34-
35-
# Build inlined badges
36-
dist-pre: $(patsubst %.svg, %.ts, $(shell find src/badges/*.svg))
37-
38-
# Clean inlined badges
39-
clean-pre:
40-
rm -rf src/badges/*.ts
21+
include ../../../share/lambda/Makefile

modules/status/lambda/dist.zip

-2.53 KB
Binary file not shown.

modules/status/lambda/src/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* IN THE SOFTWARE.
2121
*/
2222

23+
import * as fs from "fs"
2324
import * as GitHub from "github"
2425

2526
import { Callback, Context } from "aws-lambda"
@@ -142,7 +143,7 @@ const mapping: CodeBuildGitHubMapping = {
142143
* GitHub build status to badge mapping
143144
*/
144145
const badges: GitHubBadgeMapping = {
145-
success: "./badges/success",
146+
success: "./badges/passing",
146147
failure: "./badges/failing",
147148
error: "./badges/errored"
148149
}
@@ -219,7 +220,7 @@ export default (event: CodeBuildPhaseChange, _: Context, cb: Callback) => {
219220
s3.putObject({
220221
Bucket: process.env.CODEBUILD_BUCKET!,
221222
Key: `${repo}/status.svg`,
222-
Body: require(badges[state!]),
223+
Body: fs.readFileSync(badges[state!], "utf8"),
223224
ACL: "public-read",
224225
CacheControl: "no-cache, no-store, must-revalidate",
225226
ContentType: "image/svg+xml"

modules/status/lambda/src/tslint.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

modules/webhook/lambda/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1818
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1919
# IN THE SOFTWARE.
20-
#
20+
2121
include ../../../share/lambda/Makefile

share/badges/.gitignore

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)