Skip to content

Commit 47370f2

Browse files
committed
test condition
Issue: AAH-2029
1 parent a4a1bf3 commit 47370f2

File tree

2 files changed

+56
-44
lines changed

2 files changed

+56
-44
lines changed

.github/workflows/build_publish.yml

Lines changed: 55 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -24,50 +24,62 @@ jobs:
2424
shell: bash
2525
run: echo "galaxy_ng_version=$(python3 setup.py --version)" >> $GITHUB_ENV
2626

27-
- name: Install LDAP requirements
28-
run: sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev build-essential gettext python-setuptools
29-
30-
- name: Upgrade pip
31-
run: pip install pip --upgrade
32-
33-
- name: Install galaxy_ng editable
34-
run: pip install -e .
35-
36-
# set variable for the next step, so only versions higher than 4.4 gets translated
37-
# 4.2 and 4.3 don't support translations
38-
- name: Check galaxy_ng version for translations
27+
- name: Print tag version
3928
shell: bash
40-
id: version_check
4129
run: |
42-
is_translatable=$(python -c 'from pkg_resources import parse_version; cmp_res = parse_version("${{ env.galaxy_ng_version }}") >= parse_version("4.4"); print(cmp_res)')
43-
echo "is_translatable=$is_translatable" >> $GITHUB_OUTPUT
30+
echo "${{ github.ref_name }}"
4431
45-
- name: Build API translations
46-
shell: bash
47-
run: "django-admin compilemessages"
48-
if: steps.version_check.outputs.is_translatable == 'True'
49-
50-
- name: Check if UI has corresponding tag
51-
shell: bash
32+
- name: Validate tag and galaxy_ng version match
33+
shell: bash
34+
if: env.galaxy_ng_version != github.ref_name
5235
run: |
53-
status_code=$(curl -LI https://api.github.com/repos/ansible/ansible-hub-ui/releases/tags/${{ env.galaxy_ng_version }} -o /dev/null -w '%{http_code}\n' -s)
54-
if [ $status_code == "404" ]
55-
then
56-
echo "::error::Corresponding tag ${{ env.galaxy_ng_version }} for ansible-hub-ui not found."
57-
exit 1
58-
fi
59-
60-
- name: Build galaxy_ng python packages
61-
run: "python3 setup.py sdist bdist_wheel"
62-
63-
- name: Install twine
64-
run: "pip install twine"
65-
66-
# - name: Verify correct PyPI package
67-
# run: "twine check dist/*"
68-
69-
- name: Publish galaxy_ng to PyPI
70-
run: "python3 -m twine upload --repository testpypi dist/*"
71-
env:
72-
TWINE_USERNAME: __token__
73-
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
36+
echo "::error::Tag ${{ github.ref_name }} and galaxy_ng version ${{ env.galaxy_ng_version }} doesn't match."
37+
exit 1
38+
39+
# - name: Install LDAP requirements
40+
# run: sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev build-essential gettext python-setuptools
41+
42+
# - name: Upgrade pip
43+
# run: pip install pip --upgrade
44+
45+
# - name: Install galaxy_ng editable
46+
# run: pip install -e .
47+
48+
# # set variable for the next step, so only versions higher than 4.4 gets translated
49+
# # 4.2 and 4.3 don't support translations
50+
# - name: Check galaxy_ng version for translations
51+
# shell: bash
52+
# id: version_check
53+
# run: |
54+
# is_translatable=$(python -c 'from pkg_resources import parse_version; cmp_res = parse_version("${{ env.galaxy_ng_version }}") >= parse_version("4.4"); print(cmp_res)')
55+
# echo "is_translatable=$is_translatable" >> $GITHUB_OUTPUT
56+
57+
# - name: Build API translations
58+
# shell: bash
59+
# run: "django-admin compilemessages"
60+
# if: steps.version_check.outputs.is_translatable == 'True'
61+
62+
# - name: Check if UI has corresponding tag
63+
# shell: bash
64+
# run: |
65+
# status_code=$(curl -LI https://api.github.com/repos/ansible/ansible-hub-ui/releases/tags/${{ env.galaxy_ng_version }} -o /dev/null -w '%{http_code}\n' -s)
66+
# if [ $status_code == "404" ]
67+
# then
68+
# echo "::error::Corresponding tag ${{ env.galaxy_ng_version }} for ansible-hub-ui not found."
69+
# exit 1
70+
# fi
71+
72+
# - name: Build galaxy_ng python packages
73+
# run: "python3 setup.py sdist bdist_wheel"
74+
75+
# - name: Install twine
76+
# run: "pip install twine"
77+
78+
# # - name: Verify correct PyPI package
79+
# # run: "twine check dist/*"
80+
81+
# - name: Publish galaxy_ng to PyPI
82+
# run: "python3 -m twine upload --repository testpypi dist/*"
83+
# env:
84+
# TWINE_USERNAME: __token__
85+
# TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from setuptools.command.sdist import sdist as _SDistCommand
1414

1515
package_name = os.environ.get("GALAXY_NG_ALTERNATE_NAME", "galaxy-ng")
16-
version = "4.7.0dev"
16+
version = "4.6.3"
1717

1818

1919
class PrepareStaticCommand(Command):

0 commit comments

Comments
 (0)