Skip to content

Commit

Permalink
Make website url default to repo URL
Browse files Browse the repository at this point in the history
  • Loading branch information
AnActualEmerald committed Aug 4, 2022
1 parent 47dd0d6 commit ed7b557
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
8 changes: 2 additions & 6 deletions cfg_edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const community = Deno.env.get("TS_COMMUNITY");
const nsfw = Deno.env.get("TS_NSFW");
const wrap = Deno.env.get("TS_WRAP");

console.log(deps)

//these should be set already but we're rewriting the whole file anyways
tstore.package.name = name;
Expand All @@ -29,11 +28,12 @@ tstore.publish.communities = [community];
tstore.build.copy[0].target = wrap;
tstore.package.dependencies = {};

console.log(tstore.build);

//check for optional inputs
if (homepage && homepage !== "") {
tstore.package.websiteUrl = homepage;
} else {
tstore.package.websiteUrl = `${Deno.env.get("GITHUB_SERVER_URL")}/${Deno.env.get("GITHUB_REPOSITORY")}`;
}

if (nsfw && nsfw !== "" ) {
Expand Down Expand Up @@ -64,9 +64,5 @@ if (deps && deps !== "") {
}






//write config file back to disk
Deno.writeTextFile("./thunderstore.toml", TOML.stringify(tstore));
7 changes: 0 additions & 7 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ function setup() {
fi



echo "::endgroup::"

}
Expand All @@ -55,12 +54,6 @@ function configure(){

echo $(deno run --allow-net --allow-env --allow-read --allow-write cfg_edit.js)

# echo "Set package community"
# sed -i "s/communities = \[\]/communities = \[ \"$TS_COMMUNITY\" \]/g" thunderstore.toml
# echo "Set package description"
# sed -i "s/description = \"Example mod description\"/description = \"$TS_DESC\"/g" thunderstore.toml
# echo "Remove example dependency" #TODO: Support dependencies
# sed -i "s/Example-Dependency = \"1.0.0\"//g" thunderstore.toml

echo "Done config edit"
echo
Expand Down

0 comments on commit ed7b557

Please sign in to comment.