mirror of
https://github.com/kopia/kopia.git
synced 2026-05-14 01:37:07 -04:00
ci: dependency upgrades (#1504)
* ci: upgraded Node to 16.13.0 LTS * ci: upgraded Hugo to 0.89.2
This commit is contained in:
26909
app/package-lock.json
generated
26909
app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -7,8 +7,8 @@ build-html: build/index.html
|
||||
deps: node_modules/.up-to-date
|
||||
|
||||
install:
|
||||
$(npm) install --no-audit
|
||||
$(npm) audit --production
|
||||
$(npm) $(npm_flags) install --no-audit
|
||||
$(npm) $(npm_flags) audit --production
|
||||
|
||||
dev: node_modules/.up-to-date
|
||||
$(npm) $(npm_flags) run start
|
||||
@@ -17,7 +17,8 @@ build/index.html: node_modules/.up-to-date src/* public/*
|
||||
$(npm) $(npm_flags) run build
|
||||
|
||||
node_modules/.up-to-date: $(npm) package.json package-lock.json
|
||||
$(retry) $(npm) $(npm_flags) install
|
||||
$(npm) $(npm_flags) install --no-audit
|
||||
$(npm) $(npm_flags) audit --production
|
||||
echo updated > node_modules/.up-to-date
|
||||
|
||||
clean:
|
||||
|
||||
30719
htmlui/package-lock.json
generated
30719
htmlui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
3
site/.gitignore
vendored
3
site/.gitignore
vendored
@@ -4,4 +4,5 @@ node_modules/
|
||||
tech-doc-hugo
|
||||
.tools/
|
||||
package-lock.json
|
||||
*.deb
|
||||
*.deb
|
||||
.hugo_build.lock
|
||||
|
||||
@@ -17,7 +17,8 @@ server: $(hugo)
|
||||
$(hugo) server --watch=$(WATCH)
|
||||
|
||||
node_modules: $(npm)
|
||||
$(npm) $(npm_flags) install
|
||||
$(npm) $(npm_flags) install --no-audit
|
||||
$(npm) $(npm_flags) audit --production
|
||||
|
||||
clean:
|
||||
rm -rf public/ resources/ node_modules/ $(TOOLS_DIR)/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
https://github.com/gohugoio/hugo/releases/download/v0.87.0/hugo_extended_0.87.0_Linux-64bit.tar.gz: f216af92c06809c03981296f513ce54d3d690715d3c9fdfaff802d4a6759a260
|
||||
https://github.com/gohugoio/hugo/releases/download/v0.87.0/hugo_extended_0.87.0_macOS-64bit.tar.gz: 93bfda80e562ea52e590b2984b101700b5c511ec89db0043d654d3bd8285aa6a
|
||||
https://github.com/gohugoio/hugo/releases/download/v0.87.0/hugo_extended_0.87.0_windows-64bit.zip: a4f7f96e97931d4147fe620e59d4999df7ae1f243be462f3545f7f9813e053e9
|
||||
https://github.com/gohugoio/hugo/releases/download/v0.89.2/hugo_extended_0.89.2_Linux-64bit.tar.gz: 8efea63ab960a91918a4c6131d10c244635cd983e4d083afdba6c6b99edb55b6
|
||||
https://github.com/gohugoio/hugo/releases/download/v0.89.2/hugo_extended_0.89.2_macOS-64bit.tar.gz: f9185f6d14eb84d9029d59cdd8a977f2f0be334c4f9d38f2099e56a0c0734731
|
||||
https://github.com/gohugoio/hugo/releases/download/v0.89.2/hugo_extended_0.89.2_macOS-ARM64.tar.gz: 99a5b4738528d4858a0237199eabc7aee77674c8c7edcfe269efb4b515566cec
|
||||
https://github.com/gohugoio/hugo/releases/download/v0.89.2/hugo_extended_0.89.2_windows-64bit.zip: 8d79db4f24fbf023c64862c37d09291ac216875dad91e71dd8753cb5883e4274
|
||||
https://github.com/golangci/golangci-lint/releases/download/v1.42.1/golangci-lint-1.42.1-darwin-amd64.tar.gz: 9c0042e91218dc1dd4eb7b54e29c7331eff081b3ac3f88b0d5df89b976fcd45c
|
||||
https://github.com/golangci/golangci-lint/releases/download/v1.42.1/golangci-lint-1.42.1-darwin-arm64.tar.gz: f649893bf2b1d24b2632b5e109884a15f3bf25cfdad46b34fb8fd13a016098fd
|
||||
https://github.com/golangci/golangci-lint/releases/download/v1.42.1/golangci-lint-1.42.1-linux-amd64.tar.gz: 214b093c15863430c4b66dd39df677dab6e38fc873ded147e331740d50eea51f
|
||||
@@ -31,8 +32,9 @@ https://github.com/rclone/rclone/releases/download/v1.56.0/rclone-v1.56.0-linux-
|
||||
https://github.com/rclone/rclone/releases/download/v1.56.0/rclone-v1.56.0-osx-amd64.zip: d079a0e04f148d409c460742d2a5d740a0a405f4a77d7cf0878becdcc0488bbd
|
||||
https://github.com/rclone/rclone/releases/download/v1.56.0/rclone-v1.56.0-osx-arm64.zip: 4effd67edbd0e9e5894223df9ce97c635e2056db54bd0cf602fa00a99c27eef3
|
||||
https://github.com/rclone/rclone/releases/download/v1.56.0/rclone-v1.56.0-windows-amd64.zip: 61c8c29cf73fe8fa440d5c051371bef924d969f95be3da8013bad867a778922c
|
||||
https://nodejs.org/dist/v14.17.6/node-v14.17.6-darwin-x64.tar.gz: e3e4c02240d74fb1dc8a514daa62e5de04f7eaee0bcbca06a366ece73a52ad88
|
||||
https://nodejs.org/dist/v14.17.6/node-v14.17.6-linux-arm64.tar.gz: 3355eae15582be48f6be0910e279abbf2324f4538d3ccb2da7e66edab6e6b0fe
|
||||
https://nodejs.org/dist/v14.17.6/node-v14.17.6-linux-armv7l.tar.gz: 977e0ae2f6729f4feba5f75a4c317174bc9617610699afd2c478c7dff6c5ba13
|
||||
https://nodejs.org/dist/v14.17.6/node-v14.17.6-linux-x64.tar.gz: 19e376214450e93e58687198070b4ab46e42357032ec65f23a7e35b0e86ad6e2
|
||||
https://nodejs.org/dist/v14.17.6/node-v14.17.6-win-x64.zip: b83e9ce542fda7fc519cec6eb24a2575a84862ea4227dedc171a8e0b5b614ac0
|
||||
https://nodejs.org/dist/v16.13.0/node-v16.13.0-darwin-arm64.tar.gz: 46d83fc0bd971db5050ef1b15afc44a6665dee40bd6c1cbaec23e1b40fa49e6d
|
||||
https://nodejs.org/dist/v16.13.0/node-v16.13.0-darwin-x64.tar.gz: 37e09a8cf2352f340d1204c6154058d81362fef4ec488b0197b2ce36b3f0367a
|
||||
https://nodejs.org/dist/v16.13.0/node-v16.13.0-linux-arm64.tar.gz: 46e3857f5552abd36d9548380d795b043a3ceec2504e69fe1a754fa76012daaf
|
||||
https://nodejs.org/dist/v16.13.0/node-v16.13.0-linux-armv7l.tar.gz: 3d22bc15b47c26129d56745cd587ead7e240a36968ceb3c4105bebc5c6a0be16
|
||||
https://nodejs.org/dist/v16.13.0/node-v16.13.0-linux-x64.tar.gz: 589b7e7eb22f8358797a2c14a0bd865459d0b44458b8f05d2721294dacc7f734
|
||||
https://nodejs.org/dist/v16.13.0/node-v16.13.0-win-x64.zip: 5a39ec5d4786c2814a6c04488bebac6423c2aaa12832b24f0882456f2e4674e1
|
||||
|
||||
@@ -25,16 +25,16 @@ type ToolInfo struct {
|
||||
osMap map[string]string
|
||||
archMap map[string]string
|
||||
stripPathComponents int
|
||||
darwinForceAMD64 bool
|
||||
unsupportedArch map[string]bool
|
||||
unsupportedOSArch map[string]bool
|
||||
}
|
||||
|
||||
func (ti ToolInfo) actualURL(version, goos, goarch string) string {
|
||||
if ti.darwinForceAMD64 && goos == "darwin" {
|
||||
goarch = "amd64"
|
||||
if ti.unsupportedArch[goarch] {
|
||||
return ""
|
||||
}
|
||||
|
||||
if ti.unsupportedArch[goarch] {
|
||||
if ti.unsupportedOSArch[goos+"/"+goarch] {
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -68,8 +68,10 @@ func (ti ToolInfo) actualURL(version, goos, goarch string) string {
|
||||
"linux": "Linux", "darwin": "macOS",
|
||||
},
|
||||
unsupportedArch: map[string]bool{
|
||||
"arm": true,
|
||||
"arm64": true,
|
||||
"arm": true,
|
||||
},
|
||||
unsupportedOSArch: map[string]bool{
|
||||
"linux/arm64": true,
|
||||
},
|
||||
},
|
||||
"gotestsum": {
|
||||
@@ -110,7 +112,6 @@ func (ti ToolInfo) actualURL(version, goos, goarch string) string {
|
||||
osMap: map[string]string{"windows": "win"},
|
||||
archMap: map[string]string{"arm": "armv7l", "amd64": "x64"},
|
||||
stripPathComponents: 1,
|
||||
darwinForceAMD64: true,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -118,7 +119,8 @@ func (ti ToolInfo) actualURL(version, goos, goarch string) string {
|
||||
tool = flag.String("tool", "", "Name of the tool:version")
|
||||
outputDir = flag.String("output-dir", "", "Output directory")
|
||||
|
||||
testAll = flag.Bool("test-all", false, "Unpacks the package for all GOOS/ARCH combinations")
|
||||
testAll = flag.Bool("test-all", false, "Unpacks the package for all GOOS/ARCH combinations")
|
||||
regenerateChecksums = flag.Bool("regenerate-checksums", false, "Regenerate checksums")
|
||||
)
|
||||
|
||||
var buildArchitectures = []struct {
|
||||
@@ -185,7 +187,7 @@ func main() {
|
||||
}
|
||||
|
||||
// all good
|
||||
if errorCount == 0 {
|
||||
if errorCount == 0 && !*regenerateChecksums {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -202,6 +204,10 @@ func main() {
|
||||
fmt.Println(l)
|
||||
}
|
||||
|
||||
if *regenerateChecksums {
|
||||
return
|
||||
}
|
||||
|
||||
log.Fatalf("Error(s) encountered, see log messages above.")
|
||||
}
|
||||
|
||||
@@ -228,6 +234,29 @@ func downloadTool(toolName, toolVersion string, checksums map[string]string, err
|
||||
return nil
|
||||
}
|
||||
|
||||
if *regenerateChecksums {
|
||||
for _, ba := range buildArchitectures {
|
||||
u := t.actualURL(toolVersion, ba.goos, ba.goarch)
|
||||
if u == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
if checksums[u] != "" {
|
||||
continue
|
||||
}
|
||||
|
||||
log.Printf("downloading %v...", u)
|
||||
|
||||
if err := autodownload.Download(u, filepath.Join(*outputDir, ba.goos, ba.goarch), checksums, t.stripPathComponents); err != nil {
|
||||
log.Printf("ERROR %v: %v", u, err)
|
||||
|
||||
*errorCount++
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
u := t.actualURL(toolVersion, runtime.GOOS, runtime.GOARCH)
|
||||
if u == "" {
|
||||
log.Fatalf("Tool '%v' is not supported on %v/%v", toolName, runtime.GOOS, runtime.GOARCH)
|
||||
|
||||
@@ -103,8 +103,8 @@ endif
|
||||
|
||||
# tool versions
|
||||
GOLANGCI_LINT_VERSION=1.42.1
|
||||
NODE_VERSION=14.17.6
|
||||
HUGO_VERSION=0.87.0
|
||||
NODE_VERSION=16.13.0
|
||||
HUGO_VERSION=0.89.2
|
||||
GOTESTSUM_VERSION=1.7.0
|
||||
GORELEASER_VERSION=v0.176.0
|
||||
RCLONE_VERSION=1.56.0
|
||||
@@ -149,7 +149,7 @@ $(linter):
|
||||
go run github.com/kopia/kopia/tools/gettool --tool linter:$(GOLANGCI_LINT_VERSION) --output-dir $(linter_dir)
|
||||
|
||||
# hugo
|
||||
hugo_dir=$(TOOLS_DIR)$(slash)hugo-$(GOTESTSUM_VERSION)
|
||||
hugo_dir=$(TOOLS_DIR)$(slash)hugo-$(HUGO_VERSION)
|
||||
hugo=$(hugo_dir)/hugo$(exe_suffix)
|
||||
|
||||
$(hugo):
|
||||
@@ -271,10 +271,17 @@ else
|
||||
maybehugo=
|
||||
endif
|
||||
|
||||
ALL_TOOL_VERSIONS=node:$(NODE_VERSION),linter:$(GOLANGCI_LINT_VERSION),hugo:$(HUGO_VERSION),rclone:$(RCLONE_VERSION),gotestsum:$(GOTESTSUM_VERSION),goreleaser:$(GORELEASER_VERSION),kopia:0.8.4
|
||||
|
||||
verify-all-tool-checksums:
|
||||
go run github.com/kopia/kopia/tools/gettool --test-all \
|
||||
--output-dir /tmp/all-tools \
|
||||
--tool node:$(NODE_VERSION),linter:$(GOLANGCI_LINT_VERSION),hugo:$(HUGO_VERSION),rclone:$(RCLONE_VERSION),gotestsum:$(GOTESTSUM_VERSION),goreleaser:$(GORELEASER_VERSION),kopia:0.8.4
|
||||
--tool $(ALL_TOOL_VERSIONS)
|
||||
|
||||
regenerate-checksums:
|
||||
go run github.com/kopia/kopia/tools/gettool --regenerate-checksums \
|
||||
--output-dir /tmp/all-tools \
|
||||
--tool $(ALL_TOOL_VERSIONS)
|
||||
|
||||
all-tools: $(gotestsum) $(npm) $(linter) $(maybehugo)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user