Compare commits

..

No commits in common. "a05332ba66aa3a1158d56bf30f94bb5b6f8e4d03" and "c9dc7fb270725299fa134b8336f11a4b491bf724" have entirely different histories.

2 changed files with 8 additions and 17 deletions

View File

@ -27,12 +27,12 @@ jobs:
fi
echo "::notice title=GOTIME::$GOTIME"
# Set the output named "version_changed"
echo "version_changed=$GOTIME" >> $GITEA_OUTPUT
echo "version_changed=$GOTIME" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest
# needs: [ check_for_changed_version ]
# if: needs.check_for_changed_version.outputs.version_changed == 'True'
needs: [ check_for_changed_version ]
if: needs.check_for_changed_version.outputs.version_changed == 'True'
permissions:
contents: write
steps:
@ -47,7 +47,7 @@ jobs:
pip install shiv
pip install poetry
- name: Add VERSION env property
run: echo "VERSION=v$(poetry version | python -c 'import sys;print(sys.stdin.read().split()[1])')" >> $GITEA_ENV
run: echo "VERSION=v$(poetry version | python -c 'import sys;print(sys.stdin.read().split()[1])')" >> $GITHUB_ENV
- name: Build the sucker
run: |
sed -i -e "s/?????/${{ env.VERSION }}/g" src/__init__.py
@ -64,14 +64,14 @@ jobs:
)
echo """release_id=$(\
curl -X POST \
-s https://git.joekaufeld.com/api/v1/repos/${GITEA_REPOSITORY%/*}/${{ gitea.event.repository.name }}/releases \
-s https://git.joekaufeld.com/api/v1/repos/${GITHUB_REPOSITORY%/*}/${{ github.event.repository.name }}/releases \
-H "Authorization: token ${{ secrets.PAT }}" \
-H 'Content-Type: application/json' \
-d "$JSON_DATA" \
| python3 -c "import sys, json; print(json.load(sys.stdin)['id'])"\
)""" >> $GITEA_ENV
)""" >> $GITHUB_ENV
- name: Upload assets!
run: |
curl https://git.joekaufeld.com/api/v1/repos/${GITEA_REPOSITORY%/*}/${{ gitea.event.repository.name }}/releases/${{ env.release_id }}/assets \
curl https://git.joekaufeld.com/api/v1/repos/${GITHUB_REPOSITORY%/*}/${{ github.event.repository.name }}/releases/${{ env.release_id }}/assets \
-H "Authorization: token ${{ secrets.PAT }}" \
-F attachment=@utils

View File

@ -48,15 +48,6 @@ def uuid4():
click.echo(uuid.uuid4())
@main.command()
def objectid():
"""Generate a random ObjectID."""
new_id = ''
for _ in range(24):
new_id += random.choice(string.ascii_lowercase[:6] + string.digits)
click.echo(new_id)
@main.command()
@click.argument("dice")
def roll(dice: str):
@ -129,7 +120,7 @@ def update_from_gitea():
if release_data["tag_name"] == src.__version__:
status.stop()
click.echo(
"Server version is the same as current version; nothing to update."
"Server version is the same as current version;" " nothing to update."
)
return
status.update("Updating...")