mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-17 03:20:02 +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
|
TW5_BUILD_VERSION=v5.1.19
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||||
|
|
||||||
# Default to using tw5.com as the main edition for /index.html
|
# Default to using tw5.com as the main edition for /index.html
|
||||||
|
|
||||||
if [ -z "$TW5_BUILD_MAIN_EDITION" ]; then
|
if [ -z "$TW5_BUILD_MAIN_EDITION" ]; then
|
||||||
TW5_BUILD_MAIN_EDITION=./editions/tw5.com
|
TW5_BUILD_MAIN_EDITION=./editions/tw5.com
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Using TW5_BUILD_MAIN_EDITION as [$TW5_BUILD_MAIN_EDITION]"
|
||||||
|
|
||||||
# Default to the version of TiddlyWiki installed in this repo
|
# Default to the version of TiddlyWiki installed in this repo
|
||||||
|
|
||||||
if [ -z "$TW5_BUILD_TIDDLYWIKI" ]; then
|
if [ -z "$TW5_BUILD_TIDDLYWIKI" ]; then
|
||||||
TW5_BUILD_TIDDLYWIKI=./tiddlywiki.js
|
TW5_BUILD_TIDDLYWIKI=./tiddlywiki.js
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Using TW5_BUILD_TIDDLYWIKI as [$TW5_BUILD_TIDDLYWIKI]"
|
||||||
|
|
||||||
# Set up the build details
|
# Set up the build details
|
||||||
|
|
||||||
if [ -z "$TW5_BUILD_DETAILS" ]; then
|
if [ -z "$TW5_BUILD_DETAILS" ]; then
|
||||||
TW5_BUILD_DETAILS="$(git symbolic-ref --short HEAD)-$(git rev-parse HEAD) from $(git remote get-url origin)"
|
TW5_BUILD_DETAILS="$(git symbolic-ref --short HEAD)-$(git rev-parse HEAD) from $(git remote get-url origin)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Using TW5_BUILD_DETAILS as [$TW5_BUILD_DETAILS]"
|
||||||
|
|
||||||
# Set up the build output directory
|
# Set up the build output directory
|
||||||
|
|
||||||
if [ -z "$TW5_BUILD_OUTPUT" ]; then
|
if [ -z "$TW5_BUILD_OUTPUT" ]; then
|
||||||
|
@ -9,7 +9,10 @@ if(!process.env["TW5_BUILD_TIDDLYWIKI"]) {
|
|||||||
var fs = require("fs"),
|
var fs = require("fs"),
|
||||||
path = require("path");
|
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) {
|
if(!json.version) {
|
||||||
throw "Missing version number in package.json";
|
throw "Missing version number in package.json";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user