Skip to content

Commit

Permalink
Merge pull request #1489 from daku10/patch-build-caching-on-page
Browse files Browse the repository at this point in the history
Add support for build_caching of Pages Project
  • Loading branch information
jacobbednarz authored Jan 31, 2024
2 parents 812ef3a + d160952 commit d32f339
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/1489.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
pages_project: Add `build_caching` attribute
```
1 change: 1 addition & 0 deletions pages_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
4 changes: 4 additions & 0 deletions pages_project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const (
}
},
"build_config": {
"build_caching": true,
"build_command": "npm run build",
"destination_dir": "build",
"root_dir": "/",
Expand Down Expand Up @@ -178,6 +179,7 @@ const (
}
],
"build_config": {
"build_caching": true,
"build_command": "npm run build",
"destination_dir": "build",
"root_dir": "/",
Expand Down Expand Up @@ -269,6 +271,7 @@ const (
}
],
"build_config": {
"build_caching": true,
"build_command": "npm run build",
"destination_dir": "build",
"root_dir": "/",
Expand Down Expand Up @@ -399,6 +402,7 @@ var (
}

expectedPagesProjectBuildConfig = &PagesProjectBuildConfig{
BuildCaching: BoolPtr(true),
BuildCommand: "npm run build",
DestinationDir: "build",
RootDir: "/",
Expand Down

0 comments on commit d32f339

Please sign in to comment.