Skip to content

Adds support for building earlier releases using docker #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

GustavGroenborg
Copy link

@GustavGroenborg GustavGroenborg commented Apr 16, 2025

Description

In response to #36, this PR adds support for building earlier releases of the project using the docker file, and the provided installation script install-oatpp-modules.sh. The behaviour on the consumer side, has not changed, meaning that the latest version can still build an run by the following commands:

$ docker build -t example-crud .
$ docker run -p 8000:8000 -t example-crud

However, if you are to build and run an earlier release of example-crud, you can now specify the version number as an build argument, thus preventing the CMake build from failing, due to mismatching version numbers. Thus building version 1.3.0-latest would require the following commands:

$ docker build -t example-crud --build-arg VERSION=1.3.0-latest .
$ docker run -p 8000:8000 -t example-crud

Details

This behaviour was achieved by changing the installation script install-oatpp-modules.sh to accept an extra argument, specifying the version number. If such an argument is provided, the flag --branch will be specified upon cloning the required dependencies. Furthermore, a new info message has been provided, such that it can be differentiated between cloning the latest release and cloning a specific release.

To improve usability on the consumer side, a build argument was added to the docker file, in order to propagate the version number into the installation script.

The README.md has been changed to describe how to build earlier releases of the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant