Skip to content

Commit

Permalink
docs: Update Publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
myxvisual committed Jan 23, 2019
1 parent 02f3b46 commit 74cc384
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"server:dev": "cross-env NODE_ENV=development ts-node server.ts",
"server:prod": "cross-env NODE_ENV=production ts-node server.ts",
"build": "npm-run-all clean-react-types build:webpack build-html:prod",
"build:docs": "node scripts/gh-pages-build HEAD",
"build:docs": "node scripts/gh-pages-build",
"check:build": "test -d \"./build\" && rm -r \"./build\" || exit 0",
"build:ts": "npm run check:build-ts && tsc -p ./tsconfig.build.json",
"build-html:dev": "cross-env NODE_ENV=development node ./scripts/buildHTML.js",
Expand Down
2 changes: 1 addition & 1 deletion docs/scripts/gh-pages-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const versions = JSON.parse(fs.readFileSync(versionsFile, 'utf8'))
const versionIsHEAD = version === 'HEAD'
const useForcePush = args[3] === '-p'
const versionNumber = versionIsHEAD ? (
`v${JSON.parse(fs.readFileSync('../../package.json', 'utf8')).version}`
execSync('git describe --abbrev=0 --tags').toString().trim() || 'v1.0.0'
) : version

function execSyncWithLog(command) {
Expand Down
2 changes: 1 addition & 1 deletion docs/scripts/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
"v1.2.0",
"v1.2.1",
"v1.2.2",
"vv1.2.3"
"v1.2.3"
]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-uwp",
"version": "v1.2.3",
"version": "1.2.3",
"description": "UWP Design & Fluent Design UiKit by React",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/nextGitTag.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const nextVersion = `v${nextVersionStr.slice(0, nextVersionStr.length - 2)}${nex
console.log(`next git tag version is ${nextVersion}`)

const packageData = require('../package.json')
packageData.version = `${nextVersion}`
packageData.version = `${nextVersion.slice(1)}`
fs.writeFileSync('../package.json', JSON.stringify(packageData, null, 2))

runCommandsAndLog(
Expand Down

0 comments on commit 74cc384

Please sign in to comment.