mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
CI: Figure out why master is building with the wrong version number
This commit is contained in:
parent
14623d33d2
commit
5d20a54713
@ -8,24 +8,32 @@ if [ -z "$TW5_BUILD_VERSION" ]; then
|
||||
TW5_BUILD_VERSION=v5.1.19
|
||||
fi
|
||||
|
||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||
|
||||
# Default to using tw5.com as the main edition for /index.html
|
||||
|
||||
if [ -z "$TW5_BUILD_MAIN_EDITION" ]; then
|
||||
TW5_BUILD_MAIN_EDITION=./editions/tw5.com
|
||||
fi
|
||||
|
||||
echo "Using TW5_BUILD_MAIN_EDITION as [$TW5_BUILD_MAIN_EDITION]"
|
||||
|
||||
# Default to the version of TiddlyWiki installed in this repo
|
||||
|
||||
if [ -z "$TW5_BUILD_TIDDLYWIKI" ]; then
|
||||
TW5_BUILD_TIDDLYWIKI=./tiddlywiki.js
|
||||
fi
|
||||
|
||||
echo "Using TW5_BUILD_TIDDLYWIKI as [$TW5_BUILD_TIDDLYWIKI]"
|
||||
|
||||
# Set up the build details
|
||||
|
||||
if [ -z "$TW5_BUILD_DETAILS" ]; then
|
||||
TW5_BUILD_DETAILS="$(git symbolic-ref --short HEAD)-$(git rev-parse HEAD) from $(git remote get-url origin)"
|
||||
fi
|
||||
|
||||
echo "Using TW5_BUILD_DETAILS as [$TW5_BUILD_DETAILS]"
|
||||
|
||||
# Set up the build output directory
|
||||
|
||||
if [ -z "$TW5_BUILD_OUTPUT" ]; then
|
||||
|
@ -9,7 +9,10 @@ if(!process.env["TW5_BUILD_TIDDLYWIKI"]) {
|
||||
var fs = require("fs"),
|
||||
path = require("path");
|
||||
|
||||
var json = JSON.parse(fs.readFileSync(path.resolve(path.dirname(process.env["TW5_BUILD_TIDDLYWIKI"]),"./package.json"),"utf8"));
|
||||
var filename = path.resolve(path.dirname(process.env["TW5_BUILD_TIDDLYWIKI"]),"./package.json"),
|
||||
json = JSON.parse(fs.readFileSync(filename,"utf8"));
|
||||
|
||||
console.log("Extracting version from ",filename)
|
||||
|
||||
if(!json.version) {
|
||||
throw "Missing version number in package.json";
|
||||
|
Loading…
Reference in New Issue
Block a user