diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml index 88a9807..5996be8 100644 --- a/.gitea/workflows/publish.yaml +++ b/.gitea/workflows/publish.yaml @@ -24,7 +24,7 @@ jobs: - run: yarn - name: Run yarn build run: | - yarn build + yarn dist - name: Configure git.vdb.to npm registry run: | npm config set registry https://git.vdb.to/api/packages/cerc-io/npm/ diff --git a/package.json b/package.json index 1c64a97..731a4ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/console-app", - "version": "1.3.2", + "version": "1.3.3", "description": "Laconic Console", "repository": "https://github.com/cerc-io/laconic-console", "main": "dist/es/index.js", @@ -12,7 +12,8 @@ "build": "yarn dist", "build:babel": "babel ./src --out-dir ./dist/es --ignore \"**/*.test.js\" --source-maps inline", "clean": "rm -rf dist", - "dist": "yarn clean && yarn build:babel && CONFIG_FILE=${LACONIC_HOSTED_CONFIG_FILE:-config-production.yml} webpack", + "updatever": "scripts/update_version.sh > src/version.json", + "dist": "yarn clean && yarn updatever && yarn build:babel && CONFIG_FILE=${LACONIC_HOSTED_CONFIG_FILE:-config-production.yml} webpack", "lint": "semistandard 'src/**/*.js'", "start": "CONFIG_FILE=${CONFIG_FILE:-config-testnet.yml} VERBOSE=true webpack-dev-server --mode development", "test": "jest --rootDir ./src --passWithNoTests --no-cache" diff --git a/scripts/update_version.sh b/scripts/update_version.sh new file mode 100755 index 0000000..5ec902b --- /dev/null +++ b/scripts/update_version.sh @@ -0,0 +1,8 @@ +#/bin/bash + + +NAME=`cat package.json | jq '.name'` +VERSION=`cat package.json | jq '.version'` +DATE=`date --rfc-3339=seconds` + +echo '{"build": {}}' | jq ".build.name = $NAME" | jq ".build.version = $VERSION" | jq ".build.buildDate = \"$DATE\"" diff --git a/src/version.json b/src/version.json index b04ef17..e3e911e 100644 --- a/src/version.json +++ b/src/version.json @@ -1,7 +1,7 @@ { "build": { - "name": "@cerc-io/console-app", - "buildDate": "2020-12-19T03:06:08.492Z", - "version": "1.2.9-alpha.1" + "name": "", + "version": "", + "buildDate": "" } }