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

The Great Rename - Blueprint #3

Merged
merged 7 commits into from
Apr 6, 2024
Merged
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
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ body:
description: |
examples:
- **Server Software**: Paper Spigot 1.17.1
- **ProSchematicBuilder Version**: 1.1.7.3-ALPHA
- **ProMCCore Version**: 1.0.3.1-ALPHA
- **Blueprint Version**: 1.1.7.3-ALPHA
- **Codex Version**: 1.0.3.1-ALPHA

Then run `/plugins` on your server and paste that list for us.
value: |
- Server Software:
- ProSkillAPI Version:
- ProMCCore Version:
- Fabled Version:
- Codex Version:
- Plugins:
render: markdown
validations:
Expand Down
19 changes: 14 additions & 5 deletions .github/notify_published.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import re
import sys

import requests
import simplejson as json
import sys

is_dev = len(sys.argv) >= 3 and bool(sys.argv[2])
search_string = \
r'Uploaded to (ossrh|central): (https:\/\/s01\.oss\.sonatype\.org(:443)?\/.*?\/com\/promcteam\/(.*?)\/(.*?)\/(' \
r'Uploaded to (ossrh|central): (https:\/\/s01\.oss\.sonatype\.org(:443)?\/.*?\/studio\/magemonkey\/(.*?)\/(.*?)\/(' \
r'.*?)(?<!sources|javadoc)\.jar(?!\.asc)) '


Expand All @@ -21,15 +20,25 @@ def get_info():


version, name, url = get_info()
if is_dev:
split = version.split('-')[0:-2]
version = '-'.join(split)
if not is_dev:
url = url.replace('https://s01.oss.sonatype.org:443/service/local/staging/deployByRepositoryId/compromcteam-1002',
'https://s01.oss.sonatype.org/service/local/repositories/releases/content')
url = re.sub(
'https:\/\/s01\.oss\.sonatype\.org:443\/service\/local\/staging\/deployByRepositoryId\/studiomagemonkey-\d+',
'https://s01.oss.sonatype.org/service/local/repositories/releases/content',
url)
embed = {
'username': 'Dev Mage',
'author': {
'name': 'New ' + ('Dev ' if is_dev else '') + 'Build Available!',
'url': 'https://github.com/promcteam/' + name
},
'image': {
'url': 'https://fabled.magemonkey.studio/' + ('dev_build.gif' if is_dev else 'release_build.gif')
},
'title': version,
'description': 'Click the link above to download the new build!',
'url': url,
'color': 5341129
}
Expand Down
1 change: 0 additions & 1 deletion .github/update_readme.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import re
import sys

is_dev = len(sys.argv) >= 2 and bool(sys.argv[1])
Expand Down
2 changes: 1 addition & 1 deletion .github/update_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def replace_version():
else:
version = ver[0][2]
minor = int(ver[0][3])
new_version = version[:-(len(str(minor)))] + str(minor+1)
new_version = version[:-(len(str(minor)))] + str(minor + 1)
contents = re.sub(regex,
' <version>' + new_version + '</version>',
contents,
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/devbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,27 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
if: github.event.commits[0].author.name != 'Auto Bot'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
name: Checkout repo
with:
token: ${{ secrets.ACTIONS_PAT }}
- name: Configure git
run: |
git config user.name "Auto Bot"
git config user.name "Build Monkey"
git config user.email "<>"
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: 'Create settings.xml'
uses: s4u/maven-settings-action@v2.4.1
uses: s4u/maven-settings-action@v2.8.0
with:
githubServer: false
servers: '[{"id": "ossrh", "username": "Travja", "password": "${{ secrets.SONATYPE_DEPLOY_KEY }}"}]'
Expand All @@ -36,13 +39,18 @@ jobs:
mvn clean deploy -P gpg,publish -DcreateChecksum=true 2>&1 | tee log.txt
result_code=${PIPESTATUS[0]}
exit $result_code
- name: Tag release version
run: |
version=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)
git tag -a $version -m "Dev $version"
- name: Update version
run: python ./.github/update_version.py true
- name: Push to git
run: |
git add .
git reset settings.xml log.txt
git commit -m "Update dev version"
git reset settings.xml log.txt toolchains.xml
git commit -m "[ci skip] Update dev version"
git push
git push --tags
- name: Notify Discord
run: pip install simplejson && python ./.github/notify_published.py ${{ secrets.WEBHOOK_URL }}
run: pip install simplejson && python ./.github/notify_published.py ${{ secrets.WEBHOOK_URL }} true
7 changes: 4 additions & 3 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 17
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: 'Create settings.xml'
uses: s4u/maven-settings-action@v2.4.1
uses: s4u/maven-settings-action@v2.8.0
with:
githubServer: false
servers: '[{"id": "promcteam", "username": "Travja", "password": "${{ secrets.GITHUB_TOKEN }}"}]'
Expand Down
35 changes: 22 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,26 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
if: github.event.commits[0].author.name != 'Auto Bot'

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
token: ${{ secrets.ACTIONS_PAT }}
- name: Configure git
run: |
git config user.name "Auto Bot"
git config user.name "Build Monkey"
git config user.email "<>"
- name: Set up JDK 17
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: 'Create settings.xml'
uses: s4u/maven-settings-action@v2.4.1
uses: s4u/maven-settings-action@v2.8.0
with:
githubServer: false
servers: '[{"id": "ossrh", "username": "Travja", "password": "${{ secrets.SONATYPE_DEPLOY_KEY }}"}, {"id": "central", "username": "Travja", "password": "${{ secrets.SONATYPE_DEPLOY_KEY }}"}]'
Expand All @@ -38,20 +40,27 @@ jobs:
mvn clean deploy -P gpg,publish -DcreateChecksum=true 2>&1 | tee log.txt
result_code=${PIPESTATUS[0]}
exit $result_code
- name: Update version
run: python ./.github/update_version.py
- name: Update version
run: python ./.github/update_version.py true
- name: Update README
run: python ./.github/update_readme.py
- name: Push to git
- name: Tag release version
run: |
git add .
git reset settings.xml log.txt
git commit -m "Update release version"
git commit -m "[ci skip] Update release version"
version=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)
git tag -a $version -m "Release $version"
git push
git push --tags
git fetch --unshallow --all
git checkout dev
git merge -X theirs --no-edit main
- name: Update version
run: python ./.github/update_version.py
- name: Update version
run: python ./.github/update_version.py true
- name: Push to git
run: |
git add .
git commit -m "[ci skip] Update version for development"
git push
- name: Notify Discord
run: pip install simplejson && python ./.github/notify_published.py ${{ secrets.WEBHOOK_URL }}
run: pip install simplejson && python ./.github/notify_published.py ${{ secrets.WEBHOOK_URL }}
26 changes: 17 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
[![Build](https://github.com/promcteam/ProSchematicBuilder/actions/workflows/maven.yml/badge.svg?branch=main)](https://s01.oss.sonatype.org/content/repositories/snapshots/com/promcteam/proschematicbuilder/)
[![Build](https://github.com/promcteam/ProSchematicBuilder/actions/workflows/release.yml/badge.svg?branch=main)](https://s01.oss.sonatype.org/content/repositories/snapshots/com/promcteam/proschematicbuilder/)
[![Build](https://github.com/promcteam/ProSchematicBuilder/actions/workflows/devbuild.yml/badge.svg?branch=dev)](https://s01.oss.sonatype.org/content/repositories/snapshots/com/promcteam/proschematicbuilder/1.0-R0.10-SNAPSHOT/)
[![Build](https://github.com/promcteam/blueprint/actions/workflows/maven.yml/badge.svg?branch=main)](https://s01.oss.sonatype.org/content/repositories/snapshots/studio/magemonkey/blueprint/)
[![Build](https://github.com/promcteam/blueprint/actions/workflows/release.yml/badge.svg?branch=main)](https://s01.oss.sonatype.org/content/repositories/snapshots/studio/magemonkey/blueprint/)
[![Build](https://github.com/promcteam/blueprint/actions/workflows/devbuild.yml/badge.svg?branch=dev)](https://s01.oss.sonatype.org/content/repositories/snapshots/studio/magemonkey/blueprint/1.0.0-R0.1-SNAPSHOT/)

# ProSchematicBuilder
Let [Citizens](https://www.spigotmc.org/resources/citizens.13811/) NPCs build your schematics and structures block by
# Blueprint

Let [Citizens](https://www.spigotmc.org/resources/citizens.13811/) NPCs build your schematics and structures block by
block.

## Dependencies

- [Citizens](https://www.spigotmc.org/resources/citizens.13811/)
- [ProMCCore](https://www.spigotmc.org/resources/promccore.93608/)
- [Codex](https://www.spigotmc.org/resources/promccore.93608/)

## Usage

1) Create a NPC with Citizens and give it the 'builder' trait.

Example: `/npc create Bob --trait builder`

2) Select the NPC, either by right clicking them or through `/npc select <npc>`
3) Load a schematic with `/schematicbuilder load <file name>`.
3) Load a schematic with `/blueprint load <file name>`.

Example: `/schematicbuilder load house.schem`
Example: `/blueprint load house.schem`

This will load the included example file `house.schem`.

4) Position the NPC in the center of the area in which it should build.
5) Start the NPC building with: `/schematicbuilder build`
5) Start the NPC building with: `/blueprint build`
6) Watch the magic happen!

### A huge thanks to our contributors

<a href="https://github.com/promcteam/blueprint/graphs/contributors">
<img src="https://contrib.rocks/image?repo=promcteam/blueprint" />
</a>
29 changes: 16 additions & 13 deletions doc/README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
[![Build](https://github.com/promcteam/ProSchematicBuilder/actions/workflows/maven.yml/badge.svg?branch=main)](https://s01.oss.sonatype.org/content/repositories/snapshots/com/promcteam/proschematicbuilder/)
[![Build](https://github.com/promcteam/ProSchematicBuilder/actions/workflows/release.yml/badge.svg?branch=main)](https://s01.oss.sonatype.org/content/repositories/snapshots/com/promcteam/proschematicbuilder/)
[![Build](https://github.com/promcteam/ProSchematicBuilder/actions/workflows/devbuild.yml/badge.svg?branch=dev)](https://s01.oss.sonatype.org/content/repositories/snapshots/com/promcteam/proschematicbuilder/${project.version}/)
[![Build](https://github.com/promcteam/${project.artifactId}/actions/workflows/maven.yml/badge.svg?branch=main)](https://s01.oss.sonatype.org/content/repositories/snapshots/studio/magemonkey/${project.artifactId}/)
[![Build](https://github.com/promcteam/${project.artifactId}/actions/workflows/release.yml/badge.svg?branch=main)](https://s01.oss.sonatype.org/content/repositories/snapshots/studio/magemonkey/${project.artifactId}/)
[![Build](https://github.com/promcteam/${project.artifactId}/actions/workflows/devbuild.yml/badge.svg?branch=dev)](https://s01.oss.sonatype.org/content/repositories/snapshots/studio/magemonkey/${project.artifactId}/${project.version}/)

# ${project.name}
Let [Citizens](https://www.spigotmc.org/resources/citizens.13811/) NPCs build your schematics and structures block by

Let [Citizens](https://www.spigotmc.org/resources/citizens.13811/) NPCs build your schematics and structures block by
block.

## Dependencies

- [Citizens](https://www.spigotmc.org/resources/citizens.13811/)
- [ProMCCore](https://www.spigotmc.org/resources/promccore.93608/)
- [Codex](https://www.spigotmc.org/resources/promccore.93608/)

## Usage

1) Create a NPC with Citizens and give it the 'builder' trait.

Example: `/npc create Bob --trait builder`
Example: `/npc create Bob --trait builder`

2) Select the NPC, either by right clicking them or through `/npc select <npc>`
3) Load a schematic with `/schematicbuilder load <file name>`.
2) Select the NPC, either by right-clicking them or through `/npc select <npc>`
3) Load a schematic with `/blueprint load <file name>`.

Example: `/schematicbuilder load house.schem`
Example: `/blueprint load house.schem`

This will load the included example file `house.schem`.
This will load the included example file `house.schem`.

4) Position the NPC in the center of the area in which it should build.
5) Start the NPC building with: `/schematicbuilder build`
5) Start the NPC building with: `/blueprint build`
6) Watch the magic happen!

### A huge thanks to our contributors
<a href="https://github.com/promcteam/ProSchematicBuilder/graphs/contributors">
<img src="https://contrib.rocks/image?repo=promcteam/ProSchematicBuilder" />

<a href="https://github.com/promcteam/${project.artifactId}/graphs/contributors">
<img src="https://contrib.rocks/image?repo=promcteam/${project.artifactId}" />
</a>
Loading
Loading