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

#227: rultor modification #228

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
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: 4 additions & 2 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:

- uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
java-version: '11'

- uses: suisei-cn/[email protected]
name: Download ANTLR
Expand Down Expand Up @@ -53,7 +54,8 @@ jobs:

- uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
java-version: '11'

- run: |
wget https://www.antlr.org/download/antlr-4.9.2-complete.jar
Expand Down
32 changes: 24 additions & 8 deletions .rultor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
docker:
image: "iammaxim/j2eo:latest"
as_root: true
image: "yegor256/rultor-image:1.9.1"
architect:
- yegor256
assets:
Expand All @@ -9,17 +8,34 @@ assets:
secring.gpg: yegor256/polystat-secrets#secring.gpg
docker-password: yegor256/polystat-secrets#docker-password
install: |
cp ../gradle.properties .
wget https://www.antlr.org/download/antlr-4.9.2-complete.jar
pdd --file=/dev/null
merge:
script: |
gradle build --info
mvn clean install --errors -Dstyle.color=never
release:
script: |-
[[ "${tag}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || exit -1
gradle build fatJar publish -x test --info -Dcandidates=false -PmvnPublicationVersion=${tag} -Dsigning.secretKeyRingFile=/home/r/secring.gpg
mv "J2EO-${tag}.jar" j2eo.jar
mvn versions:set "-DnewVersion=${tag}" -Dstyle.color=never
git commit -am "${tag}"
mvn clean install -Dinvoker.skip
mvn clean deploy -Ppolystat -Psonatype --errors --settings ../settings.xml -Dstyle.color=never
mkdir /tmp/polystat
cp -R src/main/eo /tmp/polystat/objects
cp -R src/test/eo /tmp/polystat/tests
branch=$(git rev-parse --abbrev-ref HEAD)
git checkout gh-pages
git reset --hard
sudo git config --global --add safe.directory "$(pwd)"
sudo /bin/bash -c "cd '$(pwd)'; git clean -fd"
rm -rf polystat
cp -R /tmp/polystat .
find polystat -name '*.eo' | xargs sed -i "s/0\.0\.0/${tag}/g"
git add polystat
find polystat -name '*.eo' > polystat.lst
git add polystat.lst
git commit -am "polystat ${tag}"
git checkout "${branch}"
image=yegor256/j2eo
sudo docker build "$(pwd)" --tag "${image}:${tag}"
cat ../docker-password | sudo docker login --password-stdin --username yegor256
sudo docker push "${image}:${tag}"
includealex marked this conversation as resolved.
Show resolved Hide resolved
sudo docker push "${image}:${tag}"