From af29d64647482fef25a050a47584babe13a00f05 Mon Sep 17 00:00:00 2001 From: daku10 Date: Tue, 30 Jan 2024 16:06:15 +0900 Subject: [PATCH 1/2] Add support for build_caching of Pages Project --- pages_project.go | 1 + pages_project_test.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/pages_project.go b/pages_project.go index 0aa7eeee893..202846158a6 100644 --- a/pages_project.go +++ b/pages_project.go @@ -53,6 +53,7 @@ type PagesProjectSourceConfig struct { // PagesProjectBuildConfig represents the configuration of a Pages project build process. type PagesProjectBuildConfig struct { + BuildCaching *bool `json:"build_caching,omitempty"` BuildCommand string `json:"build_command"` DestinationDir string `json:"destination_dir"` RootDir string `json:"root_dir"` diff --git a/pages_project_test.go b/pages_project_test.go index 3c4b7ecc049..49861c06944 100644 --- a/pages_project_test.go +++ b/pages_project_test.go @@ -44,6 +44,7 @@ const ( } }, "build_config": { + "build_caching": true, "build_command": "npm run build", "destination_dir": "build", "root_dir": "/", @@ -178,6 +179,7 @@ const ( } ], "build_config": { + "build_caching": true, "build_command": "npm run build", "destination_dir": "build", "root_dir": "/", @@ -269,6 +271,7 @@ const ( } ], "build_config": { + "build_caching": true, "build_command": "npm run build", "destination_dir": "build", "root_dir": "/", @@ -399,6 +402,7 @@ var ( } expectedPagesProjectBuildConfig = &PagesProjectBuildConfig{ + BuildCaching: BoolPtr(true), BuildCommand: "npm run build", DestinationDir: "build", RootDir: "/", From d1609526eff300ec927048a61820fca78f6d9606 Mon Sep 17 00:00:00 2001 From: daku10 Date: Tue, 30 Jan 2024 17:11:28 +0900 Subject: [PATCH 2/2] add changelog --- .changelog/1489.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/1489.txt diff --git a/.changelog/1489.txt b/.changelog/1489.txt new file mode 100644 index 00000000000..00fd540ecc2 --- /dev/null +++ b/.changelog/1489.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +pages_project: Add `build_caching` attribute +```