-
Notifications
You must be signed in to change notification settings - Fork 34
Update godel
The version of gödel used by a project can be updated by running ./godelw update
.
-
${GOPATH}/src/${PROJECT_PATH}
exists, is the working directory and is initialized as a Git repository and Go module - Project contains
godel
andgodelw
- Project contains
main.go
- Project contains
.gitignore
that ignores GoLand files - Project contains
echo/echo.go
,echo/echo_test.go
andecho/echoer.go
-
godel/config/dist-plugin.yml
is configured to buildechgo2
- Project is tagged as 0.0.1
-
godel/config/dist-plugin.yml
is configured to create distributions forechgo
- Project is tagged as 0.0.2
-
dockerctx
directory exists andgodel/config/dist-plugin.yml
is configured to build Docker images for the product - Go files have license headers
-
godel/config/godel.yml
is configured to add the go-generate plugin -
godel/config/generate-plugin.yml
is configured to generate string function -
godel/config/godel.yml
is configured to ignore all.+_string.go
files -
integration_test
contains integration tests -
godel/config/test-plugin.yml
is configured to specify the "integration" tag -
docs
contains documentation -
.circleci/config.yml
exists - Project is tagged as 1.0.0
The version of gödel used by a project can be updated by running the ./godelw update
command.
The ./godelw update
operation compares the project's current version of gödel with the latest released version
according to GitHub. The query for the latest release is performed at most once per hour by default. The
--cache-duration
flag can be used to modify this. If the current version does not match the latest version, it
downloads the latest version and updates the files in the project as necessary.
Updating gödel will typically update the godelw
wrapper file and may add new configuration files to the godel/config
directory. Updating gödel will also run the upgrade-configuration
command, which will upgrade the configuration for
all of the loaded plugins if necessary. Any files that are updated are always backed up first.
Currently, the tutorial uses the latest available version, so the update
task has no effect.
The godelw
wrapper ensures that the required version of gödel is present on the system (downloading it if necessary)
on every invocation, so when other developers (or the CI system) checks out a version of the project that updates the
version of gödel that is used, the first ./godelw
command they invoke will ensure that the updated version is
available. This ensures that all gödel operations are always using the correct version of the program.
-
${GOPATH}/src/${PROJECT_PATH}
exists, is the working directory and is initialized as a Git repository and Go module - Project contains
godel
andgodelw
- Project contains
main.go
- Project contains
.gitignore
that ignores GoLand files - Project contains
echo/echo.go
,echo/echo_test.go
andecho/echoer.go
-
godel/config/dist-plugin.yml
is configured to buildechgo2
- Project is tagged as 0.0.1
-
godel/config/dist-plugin.yml
is configured to create distributions forechgo
- Project is tagged as 0.0.2
-
dockerctx
directory exists andgodel/config/dist-plugin.yml
is configured to build Docker images for the product - Go files have license headers
-
godel/config/godel.yml
is configured to add the go-generate plugin -
godel/config/generate-plugin.yml
is configured to generate string function -
godel/config/godel.yml
is configured to ignore all.+_string.go
files -
integration_test
contains integration tests -
godel/config/test-plugin.yml
is configured to specify the "integration" tag -
docs
contains documentation -
.circleci/config.yml
exists - Project is tagged as 1.0.0
-
godelw
is updated to the latest version
The --version
flag can be used to upgrade gödel to a specific version.
The --checksum
flag can be used to specify the expected checksum for the update.
The --sync
flag can be used to specify that the update operation should update gödel to match the values specified
in the godel/config/godel.properties
file. The file should be edited to match the desired state first.
Updating gödel in this manner requires knowing the distribution URL for the target version. Although it is optional, it is recommended to have the SHA-256 checksum of the distribution as well to ensure the integrity of the update.
- Home
-
Tutorial
- Add gödel to a project
- Add Git hooks to enforce formatting
- Generate IDE project for GoLand
- Format Go files
- Run static checks on code
- Run tests
- Build
- Run
- Dist
- Publish
- Build and push Docker images
- Generate license headers
- Go generate tasks
- Define excludes
- Write integration tests
- Sync a documentation directory with GitHub wiki
- Verify project
- Set up CI to run tasks
- Update gödel
- Update legacy gödel
- Other commands
- Conclusion
- Name
- Philosophy
- Architecture
- Plugins
- Configuration