Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
A 0.0.3 release to test auto updaters out.
Browse files Browse the repository at this point in the history
  • Loading branch information
PoneyClairDeLune committed Mar 22, 2023
1 parent 83a3c94 commit 2ce1eff
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ If upgrades are required, the script should able to download a new version autom
* Download the comfort bundle (`deno_windows.zip`) from GitHub Releases.
* Choose a folder, and extract the bundle.
* Open a terminal, and direct to that folder.
* Run `.\deno.exe --allow-net --allow-env --allow-read --allow-write deno.js paint <yourRedditUsername> <yourRedditPassword>`.
* If you have enabled 2FA, the OTP field is also available. Try running `.\deno.exe --allow-net --allow-env --allow-read --allow-write deno.js paint <yourRedditUsername> <yourRedditPassword> <otp>`.
* Run `.\deno.exe run --allow-net --allow-env --allow-read --allow-write deno.js paint <yourRedditUsername> <yourRedditPassword>`.
* If you have enabled 2FA, the OTP field is also available. Try running `.\deno.exe run --allow-net --allow-env --allow-read --allow-write deno.js paint <yourRedditUsername> <yourRedditPassword> <otp>`.
* Start your auto-guided painting adventure!

If upgrades are required, the script should able to download a new version, then terminate itself automatically. But after that, you have to restart the script all by yourself with the command above.
Expand Down
1 change: 1 addition & 0 deletions src/bash/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ else
if [ "$TERMUX_VERSION" != "" ] ; then
installVer=node
echo "Termux detected. Installing Node.js on Termux..."
echo "This will take longer than expected. Make sure you have a good enough Internet connection."
apt update
apt upgrade -y
apt install openssl -y
Expand Down
2 changes: 1 addition & 1 deletion src/core/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const dim3Prop = Array.from("rgb");

let BuildInfo = {
name: "Painted Palette",
ver: "0.0.2"
ver: "0.0.3"
};

let dim3Dist = function (a, b) {
Expand Down
10 changes: 7 additions & 3 deletions src/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ let updateChecker = async function () {
// Check for pixel updates in parallel
let remoteVersion = await (await fetch("https://github.com/ltgcgo/painted-palette/raw/main/version")).text();
remoteVersion = remoteVersion.replaceAll("\r", "\n").replaceAll("\n", "").trim();
console.info(`Local: v${BuildInfo.ver}, remote: v${remoteVersion}`);
if (remoteVersion != BuildInfo.ver) {
console.info(`Update available (v${remoteVersion})!`);
if (WingBlade.os.toLowerCase() == "windows") {
console.info(`Please update and restart ${BuildInfo.name} manually. Quitting...`);
console.info(`Please update and restart ${BuildInfo.name} manually.\nYou only need to replace the current deno.js file with the newer file.\nDownload link: https://github.com/ltgcgo/painted-palette/releases/download/${remoteVersion}/${WingBlade.variant.toLowerCase()}.js\nQuitting...`);
WingBlade.exit(1);
} else {
console.info("Downloading the new update...");
Expand Down Expand Up @@ -66,7 +65,12 @@ let main = async function (args) {
};
case "help": {
// Show help
console.info(`help Show this message\npaint Use the provided credentials to paint on Reddit\n Example: ./palette-bot paint username password\ntest Use the provided credentials to paint on the test server\n Example: ./palette-bot test sessionToken fallbackToken refreshToken\n\n./install.sh is provided to reinstall this program.`);
console.info(`help Show this message\npaint Use the provided credentials to paint on Reddit\n Example: ./palette-bot paint username password\ntest Use the provided credentials to paint on the test server\n Example: ./palette-bot test sessionToken fallbackToken refreshToken`);
if (WingBlade.os != "windows") {
console.info("\n./install.sh is provided to reinstall this program.");
} else {
console.info("\nManual update is required, but only deno.js needs to be replaced.");
};
WingBlade.exit(1);
break;
};
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.1
0.0.3

0 comments on commit 2ce1eff

Please sign in to comment.