Merge pull request #4696 from urbit/lf/version-local-state

interface: version local state by commit hash
This commit is contained in:
matildepark 2021-03-30 20:10:07 -04:00 committed by GitHub
commit 167129816b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -6,7 +6,10 @@ const urbitrc = require('./urbitrc');
const fs = require('fs');
const util = require('util');
const _ = require('lodash');
const exec = util.promisify(require('child_process').exec);
const { execSync } = require('child_process');
const GIT_DESC = execSync('git describe --always', { encoding: 'utf8' }).trim();
function copyFile(src,dest) {
return new Promise((res,rej) =>
@ -131,6 +134,7 @@ module.exports = {
plugins: [
new UrbitShipPlugin(urbitrc),
new webpack.DefinePlugin({
'process.env.LANDSCAPE_SHORTHASH': JSON.stringify(GIT_DESC),
'process.env.TUTORIAL_HOST': JSON.stringify('~difmex-passed'),
'process.env.TUTORIAL_GROUP': JSON.stringify('beginner-island'),
'process.env.TUTORIAL_CHAT': JSON.stringify('introduce-yourself-7010'),

View File

@ -60,5 +60,5 @@ export const createState = <StateType extends BaseState<any>>(
}), {
blacklist,
name: stateStorageKey(name),
version: 1, // TODO version these according to base hash
}));
version: process.env.LANDSCAPE_SHORTHASH
}));