update-version: also update latest version on project website
`make update-version` now also updates `web/project-website/data/flamenco.yaml` so that the new version is listed as the latest one on flamenco.blender.org. Note that such a change will only be visible online after publishing the site with `make project-website`. Be sure to only do this after the build has been uploaded there, to avoid dead links.
This commit is contained in:
parent
f64ba3e0be
commit
e394e75f64
7
Makefile
7
Makefile
@ -180,7 +180,12 @@ update-version:
|
||||
@echo
|
||||
@echo 'File replacement done, commit with:'
|
||||
@echo
|
||||
@echo 'git commit -m "Bumped version to ${VERSION}" Makefile addon/flamenco/__init__.py addon/flamenco/manager addon/flamenco/manager_README.md web/app/src/manager-api'
|
||||
@echo git commit -m "Bumped version to ${VERSION}" Makefile \
|
||||
addon/flamenco/__init__.py \
|
||||
addon/flamenco/manager \
|
||||
addon/flamenco/manager_README.md \
|
||||
web/app/src/manager-api \
|
||||
web/project-website/data/flamenco.yaml
|
||||
@echo 'git tag -a -m "Tagged version ${VERSION}" v${VERSION}'
|
||||
|
||||
version:
|
||||
|
@ -34,6 +34,7 @@ func main() {
|
||||
anyFileWasChanged = anyFileWasChanged || updateMakefile()
|
||||
}
|
||||
anyFileWasChanged = anyFileWasChanged || updateAddon()
|
||||
anyFileWasChanged = anyFileWasChanged || updateWebsite()
|
||||
|
||||
if !anyFileWasChanged {
|
||||
log.Warn().Msg("nothing changed")
|
||||
|
28
cmd/update-version/website.go
Normal file
28
cmd/update-version/website.go
Normal file
@ -0,0 +1,28 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
const websiteFile = "web/project-website/data/flamenco.yaml"
|
||||
|
||||
// updateWebsite changes the version number of the latest version in the project
|
||||
// website.
|
||||
// Returns whether the file actually changed.
|
||||
func updateWebsite() bool {
|
||||
replacer := func(line string) string {
|
||||
if !strings.HasPrefix(line, "latestVersion: ") {
|
||||
return line
|
||||
}
|
||||
return fmt.Sprintf("latestVersion: %s", cliArgs.newVersion)
|
||||
}
|
||||
|
||||
fileWasChanged, err := updateLines(websiteFile, replacer)
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Msg("error updating project website")
|
||||
}
|
||||
return fileWasChanged
|
||||
}
|
@ -12,12 +12,8 @@ people.
|
||||
|
||||
1. Update `Makefile` and change the `VERSION` and `RELEASE_CYCLE` variables.
|
||||
2. Run `make update-version`
|
||||
3. Update the version for the website in
|
||||
`web/project-website/data/flamenco.yaml`. This is currently a separate step,
|
||||
as it influences the project website and not the built software. This could
|
||||
be included in the `update-version` make target at some point.
|
||||
4. Commit & tag with the commands shown in the 2nd step.
|
||||
5. Run `make release-package`
|
||||
6. Check that the files in `dist/` are there and have a non-zero size.
|
||||
7. Run `make publish-release-packages` to upload the packages to the website.
|
||||
8. Run `make project-website` to generate and publish the new website.
|
||||
3. Commit & tag with the commands shown in the 2nd step.
|
||||
4. Run `make release-package`
|
||||
5. Check that the files in `dist/` are there and have a non-zero size.
|
||||
6. Run `make publish-release-packages` to upload the packages to the website.
|
||||
7. Run `make project-website` to generate and publish the new website.
|
||||
|
Loading…
Reference in New Issue
Block a user