Skip to content

Commit

Permalink
Switched to hardcoded version & added it to sanity checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Inrixia committed Oct 25, 2022
1 parent c944027 commit 982d2c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"build": "esbuild ./src/float.ts --bundle --platform=node --outfile=dist/float.cjs && pkg ./dist/float.cjs --out-path=./build -t latest-linux,latest-mac,latest-win --compress GZip",
"checkLint": "eslint ./src",
"lint": "eslint ./src --fix",
"sanity": "npm run checkLint && npm run testESM && npm run testBinaryWin",
"testESM": "tsc && node ./dist/float.js --sanityCheck",
"testBinaryLinux": "npm run build && ./build/float-linux --sanityCheck",
"testBinaryWin": "npm run build && cd ./build && float-win.exe --sanityCheck"
Expand Down
6 changes: 5 additions & 1 deletion src/float.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ const fetchNewVideos = async (subscriptions: Array<Subscription>, videoProcessor
};

(async () => {
const version: string = process.env.npm_package_version ?? pkg.version;
const version = "5.5.0";
if (args.sanityCheck && version !== pkg.version) {
throw new Error(`Version mismatch! package.json says ${pkg.version} but float.ts says ${version}`);
}

const latest = await fApi
.got("https://raw.githubusercontent.com/Inrixia/Floatplane-Downloader/master/package.json")
.json<{ version: string }>()
Expand Down

0 comments on commit 982d2c0

Please sign in to comment.