Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
CreatureChat
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Public
CreatureChat
Commits
ba82e698
Commit
ba82e698
authored
Aug 08, 2024
by
Jonathan Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing deploy scripts for both Modrinth and CurseForge
parent
2fb73e89
Pipeline
#12731
passed with stages
in 2 minutes 33 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
13 deletions
+10
-13
CHANGELOG.md
CHANGELOG.md
+5
-0
deploy-curseforge.sh
deploy-curseforge.sh
+4
-4
deploy-modrinth.sh
deploy-modrinth.sh
+1
-9
No files found.
CHANGELOG.md
View file @
ba82e698
...
...
@@ -4,6 +4,11 @@ All notable changes to **CreatureChat** are documented in this file. The format
[
Keep a Changelog
](
https://keepachangelog.com/en/1.0.0/
)
, and this project adheres to
[
Semantic Versioning
](
https://semver.org/spec/v2.0.0.html
)
.
## [Unreleased]
### Fixed
-
Fixed a regression caused by adding a "-forge" suffix to one of our builds
## [1.1.0] - 2024-08-07
### Added
...
...
deploy-curseforge.sh
View file @
ba82e698
...
...
@@ -90,7 +90,7 @@ for FILE in creaturechat*.jar; do
echo
"--------------
$FILE
----------------"
FILE_BASENAME
=
$(
basename
"
$FILE
"
)
OUR_VERSION
=
$(
echo
"
$FILE_BASENAME
"
| sed
-n
's/creaturechat-\(.*\)+.*\.jar/\1/p'
)
MINECRAFT_VERSION
=
$(
echo
"
$FILE_BASENAME
"
| sed
-n
's/.*+\(
.*\)
\.jar/\1/p'
)
MINECRAFT_VERSION
=
$(
echo
"
$FILE_BASENAME
"
| sed
-n
's/.*+\(
[0-9.]*\)\(-forge\)*
\.jar/\1/p'
)
VERSION_NUMBER
=
"
$OUR_VERSION
-
$MINECRAFT_VERSION
"
# Verify that OUR_VERSION and MINECRAFT_VERSION are not empty and OUR_VERSION matches VERSION
...
...
@@ -112,10 +112,10 @@ for FILE in creaturechat*.jar; do
# Determine the dependency slugs and loader ID based on the file name
if
[[
"
$FILE_BASENAME
"
==
*
"-forge.jar"
]]
;
then
DEPENDENCY_SLUGS
=(
"sinytra-connector"
"forgified-fabric-api"
)
LOADER_ID
=
"
${
GAME_VERSION_IDS
[3]
}
"
GAME_VERSIONS
=
"[
${
GAME_VERSION_IDS
[0]
}
,
${
GAME_VERSION_IDS
[1]
}
,
${
GAME_VERSION_IDS
[3]
}
,
${
GAME_VERSION_IDS
[4]
}
]
"
else
DEPENDENCY_SLUGS
=(
"fabric-api"
)
LOADER_ID
=
"
${
GAME_VERSION_IDS
[2]
}
"
GAME_VERSIONS
=
"[
${
GAME_VERSION_IDS
[0]
}
,
${
GAME_VERSION_IDS
[1]
}
,
${
GAME_VERSION_IDS
[2]
}
,
${
GAME_VERSION_IDS
[4]
}
]
"
fi
# Create dependencies array for payload
...
...
@@ -125,7 +125,7 @@ for FILE in creaturechat*.jar; do
PAYLOAD
=
$(
jq
-n
--arg
changelog
"
$CHANGELOG
"
\
--arg
changelogType
"markdown"
\
--arg
displayName
"
$FILE_BASENAME
"
\
--argjson
gameVersions
"
$
(
printf
'%s\n'
"
${
GAME_VERSION_IDS
[@]
}
"
| jq
-R
.
| jq
-s
.
)
"
\
--argjson
gameVersions
"
$
GAME_VERSIONS
"
\
--argjson
gameVersionTypeIds
"[
$GAME_TYPE_ID
]"
\
--arg
releaseType
"release"
\
--argjson
relations
"
$RELATIONS
"
\
...
...
deploy-modrinth.sh
View file @
ba82e698
...
...
@@ -34,7 +34,7 @@ for FILE in creaturechat*.jar; do
echo
"--------------
$FILE
----------------"
FILE_BASENAME
=
$(
basename
"
$FILE
"
)
OUR_VERSION
=
$(
echo
"
$FILE_BASENAME
"
| sed
-n
's/creaturechat-\(.*\)+.*\.jar/\1/p'
)
MINECRAFT_VERSION
=
$(
echo
"
$FILE_BASENAME
"
| sed
-n
's/.*+\(
.*\)
\.jar/\1/p'
)
MINECRAFT_VERSION
=
$(
echo
"
$FILE_BASENAME
"
| sed
-n
's/.*+\(
[0-9.]*\)\(-forge\)*
\.jar/\1/p'
)
VERSION_NUMBER
=
"
$OUR_VERSION
+
$MINECRAFT_VERSION
"
# Verify that OUR_VERSION and MINECRAFT_VERSION are not empty and OUR_VERSION matches VERSION
...
...
@@ -52,14 +52,6 @@ for FILE in creaturechat*.jar; do
DEPENDENCIES
=
'[{"project_id": "P7dR8mSH", "dependency_type": "required"}]'
fi
# Check if the version already exists
echo
"Checking if version
$VERSION_NUMBER
already exists on Modrinth..."
if
curl
--retry
3
--retry-delay
5
--silent
--fail
-X
GET
"
$API_URL
/project/creaturechat/version/
$VERSION_NUMBER
"
>
/dev/null 2>&1
;
then
echo
"Version
$VERSION_NUMBER
already exists, skipping."
continue
fi
echo
"Version
$VERSION_NUMBER
does not exist. Preparing to upload..."
# Calculate file hashes
SHA512_HASH
=
$(
sha512sum
"
$FILE
"
| awk
'{ print $1 }'
)
SHA1_HASH
=
$(
sha1sum
"
$FILE
"
| awk
'{ print $1 }'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment