api_tests
ansible
tests
-.git
*.sh
-pub const VERSION: &str = "0.10.3";
+pub const VERSION: &str = "unknown version";
COPY ./ ./
RUN sudo chown -R rust:rust .
+RUN echo "pub const VERSION: &str = \"$(git describe --tag)\";" > "crates/utils/src/version.rs"
RUN cargo build
# reduce binary size
# Copy the source folders
COPY . ./
+RUN echo "pub const VERSION: &str = \"$(git describe --tag)\";" > "crates/utils/src/version.rs"
# Build for debug
RUN --mount=type=cache,target=/usr/local/cargo/registry \
COPY ./ ./
RUN sudo chown -R rust:rust .
+RUN echo "pub const VERSION: &str = \"$(git describe --tag)\";" > "crates/utils/src/version.rs"
RUN cargo build --release
# reduce binary size
WORKDIR /app
COPY ./ ./
+RUN echo "pub const VERSION: &str = \"$(git describe --tag)\";" > "crates/utils/src/version.rs"
RUN cargo build --release
new_tag="$1"
third_semver=$(echo $new_tag | cut -d "." -f 3)
-# Setting the version on the backend
-pushd ../../
-echo "pub const VERSION: &str = \"$new_tag\";" > "crates/utils/src/version.rs"
-git add "crates/utils/src/version.rs"
-popd
-
# The ansible and docker installs should only update for non release-candidates
# IE, when the third semver is a number, not '2-rc'
if [ ! -z "${third_semver##*[!0-9]*}" ]; then