-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #811 from pitbull51067/Regions
Workflow file to change version
- Loading branch information
Showing
3 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Increment Version on Push | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
increment_version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Determine new version | ||
id: update_version | ||
run: | | ||
current_version=$(<legup-update/bin/main/edu.rpi.legupupdate/VERSION) | ||
IFS='.' read -r -a version_parts <<< "$current_version" | ||
first_part="${version_parts[0]}" | ||
second_part="${version_parts[1]}" | ||
last_part="${version_parts[2]}" | ||
if [[ $last_part -eq 9 ]]; then | ||
new_last_part=0 | ||
if [[ $second_part -eq 9 ]]; then | ||
new_second_part=0 | ||
new_first_part=$((first_part + 1)) | ||
else | ||
new_second_part=$((second_part + 1)) | ||
new_first_part=$first_part | ||
fi | ||
else | ||
new_last_part=$((last_part + 1)) | ||
new_second_part=$second_part | ||
new_first_part=$first_part | ||
fi | ||
new_version="$new_first_part.$new_second_part.$new_last_part" | ||
echo "New version: $new_version" | ||
echo "::set-output name=version::$new_version" | ||
- name: Update version.txt with new version | ||
run: echo "${{ steps.update_version.outputs.version }}" > legup-update/bin/main/edu.rpi.legupupdate/VERSION | ||
|
||
- name: Commit and push changes | ||
run: | | ||
git config --global user.email "pitbull51067@yahoo.com" | ||
git config --global user.name "Pitbull51067" | ||
git add -f legup-update/bin/main/edu.rpi.legupupdate/VERSION | ||
git commit -m "Increment version number" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.0.0 | ||
6.0.1 |
12 changes: 12 additions & 0 deletions
12
src/test/resources/puzzles/fillapix/rules/FinishWithBlackDirectRule/FinishSides
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<Legup> | ||
<puzzle name="Fillapix"> | ||
<board width="3" height="3"> | ||
<cells> | ||
<cell value="6" x="1" y="1"/> | ||
<cell value="-1" x="0" y="0"/> | ||
<cell value="-1" x="0" y="1"/> | ||
<cell value="-1" x="0" y="2"/> | ||
</cells> | ||
</board> | ||
</puzzle> | ||
</Legup> |