Skip to content
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

fix: report version number from git tag #134

Merged
merged 6 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/test-release-candidate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Default: 1
fetch-depth: '0'
-
name: Build test image
uses: docker/build-push-action@v4
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test_python-3.9.19_Java-11.0.21-tem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Default: 1
fetch-depth: '0'
-
name: Build test image
uses: docker/build-push-action@v4
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test_python-max_java-max.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Default: 1
fetch-depth: '0'
-
name: Build test image
uses: docker/build-push-action@v4
Expand Down
8 changes: 0 additions & 8 deletions .versionrc

This file was deleted.

2 changes: 2 additions & 0 deletions containers/configurable/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@ RUN bash -c 'curl -s https://get.sdkman.io | bash'
RUN bash -c "source $HOME/.sdkman/bin/sdkman-init.sh && sdk install java $JAVA_VERSION"

COPY --chown=$USERNAME:$USERNAME . $HOME/.plcc
RUN git config --global --add safe.directory $HOME/.plcc

ENV PATH="$HOME/.plcc/src/plcc/bin:${PATH}"
1 change: 1 addition & 0 deletions containers/plcc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ RUN addgroup -S my && adduser -S my -G my
# Copy over plcc from downloader stage.
COPY --chown=plcc:plcc . /plcc
ENV PATH="/plcc/src/plcc/bin:${PATH}"
RUN git config --global --add safe.directory /plcc

# Change user to dev.
WORKDIR /workdir
Expand Down
1 change: 1 addition & 0 deletions src/plcc/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__='8.0.0'
2 changes: 1 addition & 1 deletion src/plcc/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def get_version():
def get_version_from_git_tag():
completedProcess = subprocess.run([
'git',
'--git-dir=' + str(Path(__file__).parent.parent/'.git'),
'--git-dir=' + str(Path(__file__).parent.parent.parent/'.git'),
'describe',
'--tags'
],
Expand Down
2 changes: 1 addition & 1 deletion tests/end-to-end/plcc/reports-version-number.bats
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
echo "OUTPUT: $output"
echo "ERROR: $error"

regex='^(v?[0-9]+\.[0-9]+\.[0-9]+(-.*)?)|(Unknown)$'
regex='^(v?[0-9]+\.[0-9]+\.[0-9]+(-.*)?)$'
[[ "$output" =~ $regex ]]
[[ "$status" -eq 0 ]]
}
Loading