From 7f07b7e3f1a44ccf262f1febe67ec6f419d5ece6 Mon Sep 17 00:00:00 2001 From: Ferran Llop Date: Thu, 7 Dec 2023 10:37:58 +0100 Subject: [PATCH 1/8] Change include-codeblock version to match the version installed as specified in package.json --- book.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book.json b/book.json index f194202b..43405563 100644 --- a/book.json +++ b/book.json @@ -5,6 +5,6 @@ "cover": "images/cover.png", "plugins": [ "exercises@git+https://github.com/MostlyAdequate/plugin-exercises.git", - "include-codeblock@3.1.2" + "include-codeblock@3.2.2" ] -} + From fb35f05cad666ca796b2c2d008e5129e74657441 Mon Sep 17 00:00:00 2001 From: Ferran Llop Date: Thu, 7 Dec 2023 10:44:13 +0100 Subject: [PATCH 2/8] Increae version because now ubuntu:18.04 is unavailable on github workflows --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8edbb99c..e4e457c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,13 +7,14 @@ on: jobs: build: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - name: Checkout source code uses: actions/checkout@v2.3.1 - name: Install Calibre run: | + sudo apt install -y libopengl0 libegl1 libxcb-cursor0 wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin mkdir -p ~/.local/bin ln -s /opt/calibre/calibre ~/.local/bin/calibre From d3013ce27853bb30ad1df4dc66e30f5e51edd735 Mon Sep 17 00:00:00 2001 From: Ferran Llop Date: Thu, 7 Dec 2023 10:45:24 +0100 Subject: [PATCH 3/8] Use actual recommended syntaxis --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e4e457c9..491639cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,7 +50,7 @@ jobs: name: EPUB path: mostly-adequate-guide-to-functional-programming.epub - - run: echo "::set-output name=ID::$(git describe --tags --always)" + - run: echo "ID=$(git describe --tags --always)" >> $GITHUB_OUTPUT id: release-id - uses: softprops/action-gh-release@v1 From 70728db99f9b4b773064679fec03d7e769c0a77a Mon Sep 17 00:00:00 2001 From: Ferran Llop Date: Thu, 7 Dec 2023 10:45:57 +0100 Subject: [PATCH 4/8] Use variable for filename --- .github/workflows/build.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 491639cc..c3d77f1f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,9 @@ on: branches: - master +env: + BOOK_FILENAME: mostly-adequate-guide-to-functional-programming + jobs: build: runs-on: ubuntu-22.04 @@ -33,22 +36,22 @@ jobs: - name: Generate PDF run: | npm run generate-pdf - mv book.pdf mostly-adequate-guide-to-functional-programming.pdf + mv book.pdf ${BOOK_FILENAME}.pdf - name: Generate EPUB run: | npm run generate-epub - mv book.epub mostly-adequate-guide-to-functional-programming.epub + mv book.epub ${BOOK_FILENAME}.epub - uses: actions/upload-artifact@v2 with: name: PDF - path: mostly-adequate-guide-to-functional-programming.pdf + path: ${{ env.BOOK_FILENAME }}.pdf - uses: actions/upload-artifact@v2 with: name: EPUB - path: mostly-adequate-guide-to-functional-programming.epub + path: ${{ env.BOOK_FILENAME }}.epub - run: echo "ID=$(git describe --tags --always)" >> $GITHUB_OUTPUT id: release-id @@ -57,5 +60,5 @@ jobs: with: tag_name: ${{ steps.release-id.outputs.ID }} files: | - mostly-adequate-guide-to-functional-programming.pdf - mostly-adequate-guide-to-functional-programming.epub + ${{ env.BOOK_FILENAME }}.pdf + ${{ env.BOOK_FILENAME }}.epub From d71c604b2274c0d5ee8c279ea1ccd3129b50e4c4 Mon Sep 17 00:00:00 2001 From: Ferran Llop Date: Thu, 7 Dec 2023 10:47:41 +0100 Subject: [PATCH 5/8] Update Summary to have chapter 13 --- SUMMARY.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/SUMMARY.md b/SUMMARY.md index b33373d6..71984518 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -85,6 +85,17 @@ * [No Law and Order](ch12.md#no-law-and-order) * [In Summary](ch12.md#in-summary) * [Exercises](ch12.md#exercises) +* [Chapter 13: Monoids bring it all together](ch13.md) + * [Wild combination](ch13.md#wild-combination) + * [Abstracting addition](ch13.md#abstracting-addition) + * [All my favourite functors are semigroups.](ch13.md#all-my-favourite-functors-are-semigroups) + * [Monoids for nothing](ch13.md#monoids-for-nothing) + * [Folding down the house](ch13.md#folding-down-the-house) + * [Not quite a monoid](ch13.md#not-quite-a-monoid) + * [Grand unifying theory](ch13.md#grand-unifying-theory) + * [Group theory or Category theory?](ch13.md#group-theory-or-category-theory) + * [In summary](ch13.md#in-summary) + * [Exercises](ch13.md#exercises) * [Appendix A: Essential Functions Support](appendix_a.md) * [always](appendix_a.md#always) * [compose](appendix_a.md#compose) @@ -93,7 +104,8 @@ * [identity](appendix_a.md#identity) * [inspect](appendix_a.md#inspect) * [left](appendix_a.md#left) - * [liftA\*](appendix_a.md#lifta) + * [liftA2](appendix_a.md#lifta2) + * [liftA3](appendix_a.md#lifta3) * [maybe](appendix_a.md#maybe) * [nothing](appendix_a.md#nothing) * [reject](appendix_a.md#reject) @@ -124,6 +136,7 @@ * [prop](appendix_c.md#prop) * [reduce](appendix_c.md#reduce) * [replace](appendix_c.md#replace) + * [reverse](appendix_c.md#reverse) * [safeHead](appendix_c.md#safehead) * [safeLast](appendix_c.md#safelast) * [safeProp](appendix_c.md#safeprop) From 04436621349f96603ef292896602e8267f5eedbe Mon Sep 17 00:00:00 2001 From: Ferran Llop Date: Thu, 7 Dec 2023 10:48:11 +0100 Subject: [PATCH 6/8] Generate summary on workflow --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c3d77f1f..6df46174 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,6 +28,10 @@ jobs: with: node-version: 10.22.1 + - name: Generate summary + run: | + npm run generate-summary + - name: Setup gitbook run: | npm install From fe1d9908c7473eb31ed73e53de55ef8c63cf3d0e Mon Sep 17 00:00:00 2001 From: Ferran Llop Date: Thu, 7 Dec 2023 11:54:30 +0100 Subject: [PATCH 7/8] Fully qualify dependency because it was causing npm install to freeze on build workflow --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b2b87b40..83992394 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "The Mostly Adequate Guide to Functional Programming", "dependencies": { "gitbook-plugin-include-codeblock": "^3.2.2", - "gitbook-plugin-exercises": "MostlyAdequate/plugin-exercises" + "gitbook-plugin-exercises": "git+https://github.com/MostlyAdequate/plugin-exercises.git" }, "devDependencies": { "gitbook-cli": "^2.3.2" From b0b9d827a4462263436b7acd43007e352cd791c5 Mon Sep 17 00:00:00 2001 From: Ferran Llop Date: Thu, 7 Dec 2023 11:57:52 +0100 Subject: [PATCH 8/8] Fix missing bracket --- book.json | 1 + 1 file changed, 1 insertion(+) diff --git a/book.json b/book.json index 43405563..fc551e41 100644 --- a/book.json +++ b/book.json @@ -7,4 +7,5 @@ "exercises@git+https://github.com/MostlyAdequate/plugin-exercises.git", "include-codeblock@3.2.2" ] +}