Skip to content

Commit

Permalink
Setting version to 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Jan 17, 2022
1 parent 46eb803 commit c8d600f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ SECURITY.md
Dockerfile
docker-compose
requirements-lint.txt
scripts
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
0.1
---

* Not yet released.
* Released on 2022-01-17.
* Initial release with support for PO and Android files.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ Run to lint current directory:
Paste following snippet to your workflow YaML:

- name: Weblate Locale Linter
uses: WeblateOrg/locale_lint@main
uses: WeblateOrg/locale_lint@v0.1

## Using as pre-commit hook

Paste following snippet to your pre-commit configuration YAML:

- repo: https://github.com/WeblateOrg/locale_lint
rev: main
rev: v0.1
hooks:
- id: locale_lint

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ author: "Weblate"
description: "Linter for localization files powered by Weblate."
runs:
using: "docker"
image: "docker://ghcr.io/WeblateOrg/locale_linter:edge"
image: "docker://ghcr.io/WeblateOrg/locale_linter:v0.1"
branding:
icon: "check-square"
color: "white"
27 changes: 27 additions & 0 deletions scripts/set-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh

set -e

if [ -z "$1" ] ; then
echo 'Usage: ./scripts/set-version VERSION'
exit 1
fi

sed -i "s/^version = .*,/version = \"$1\",/" setup.cfg
sed -Ei "s/(image: \".*:).*/\\1v$1\"/" action.yml
sed -Ei "s/(uses:.*@).*/\\1v$1/" README.md
sed -i "s/rev: .*/rev: v$1/" README.md

# Update CHANGES.rst
tmp=`mktemp`
cp CHANGES.rst $tmp
cat > CHANGES.rst <<EOT
$1
---
* Released on $(LANG=C date --rfc-3339=date).
EOT
cat >> CHANGES.rst < $tmp
rm $tmp

git commit -m "Setting version to $1" README.md CHANGES.rst setup.cfg action.yml

0 comments on commit c8d600f

Please # to comment.