Skip to content

Commit

Permalink
Merge branch 'main' into feature/uk-translations
Browse files Browse the repository at this point in the history
* main: (411 commits)
  Shipped comments-ui@0.18.2
  Fixed various visual details in Comments UI (TryGhost#21121)
  Shipped comments-ui@0.18.1
  Update dependency mysql2 to v3.11.3 [SECURITY]
  Added reply button to comment replies
  Update dependency mysql2 to v3.11.2 [SECURITY]
  Fixed flaky member expertise test
  Update dependency mysql2 to v3.11.1 [SECURITY]
  Increased parallelisation of Nx processes
  Update tiptap monorepo to v2.7.2
  Fixed Article feature image not showing up in the feed
  Fixed requiring passing tests for canary builds
  Updated Nx to v19
  🐛 Fixed infinite loops in `setFeatureImageCaption` for deleted posts (TryGhost#21081)
  Fixed versioning and npm visibility for internal apps
  Update dependency html-validate to v8.24.0
  Implemented lazy loading for Inbox & Activities (TryGhost#21106)
  Added sentry logging to local revisions service for localStorage errors (TryGhost#21078)
  Added posts restore UI (TryGhost#21096)
  Fixed bounce rate on stats page (TryGhost#21097)
  ...

# Conflicts:
#	ghost/i18n/locales/uk/comments.json
#	ghost/i18n/locales/uk/portal.json
  • Loading branch information
vlavrynovych committed Sep 25, 2024
2 parents 1d034c5 + 4389140 commit 9597c1d
Show file tree
Hide file tree
Showing 717 changed files with 28,142 additions and 7,025 deletions.
7 changes: 0 additions & 7 deletions .github/labeler.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/scripts/bump-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
const fs = require('fs/promises');
const exec = require('util').promisify(require('child_process').exec);
const path = require('path');

const core = require('@actions/core');
const semver = require('semver');

(async () => {
const corePackageJsonPath = path.join(__dirname, '../../ghost/core/package.json');
const corePackageJson = require(corePackageJsonPath);

const current_version = corePackageJson.version;
console.log(`Current version: ${current_version}`);

const firstArg = process.argv[2];
console.log('firstArg', firstArg);

const buildString = await exec('git rev-parse --short HEAD').then(({stdout}) => stdout.trim());

let newVersion;

if (firstArg === 'canary') {
const bumpedVersion = semver.inc(current_version, 'minor');
newVersion = `${bumpedVersion}-pre-g${buildString}`;
} else {
const gitVersion = await exec('git describe --long HEAD').then(({stdout}) => stdout.trim().replace(/^v/, ''));
newVersion = gitVersion;
}

newVersion += '+moya';
console.log('newVersion', newVersion);

corePackageJson.version = newVersion;
await fs.writeFile(corePackageJsonPath, JSON.stringify(corePackageJson, null, 2));

const adminPackageJsonPath = path.join(__dirname, '../../ghost/admin/package.json');
const adminPackageJson = require(adminPackageJsonPath);
adminPackageJson.version = newVersion;
await fs.writeFile(adminPackageJsonPath, JSON.stringify(adminPackageJson, null, 2));

console.log('Version bumped to', newVersion);

core.setOutput('BUILD_VERSION', newVersion);
core.setOutput('GIT_COMMIT_HASH', buildString)
})();
20 changes: 17 additions & 3 deletions .github/scripts/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ const COMMAND_ADMIN = {
env: {}
};

const COMMAND_BROWSERTESTS = {
name: 'browser-tests',
command: 'nx run ghost:test:browser',
cwd: path.resolve(__dirname, '../../ghost/core'),
prefixColor: 'blue',
env: {}
};

const COMMAND_TYPESCRIPT = {
name: 'ts',
command: `while [ 1 ]; do nx watch --projects=${tsPackages} -- nx run \\$NX_PROJECT_NAME:build:ts; done`,
Expand All @@ -72,20 +80,22 @@ const COMMANDS_ADMINX = [{
name: 'adminXDeps',
command: 'while [ 1 ]; do nx watch --projects=apps/admin-x-design-system,apps/admin-x-framework -- nx run \\$NX_PROJECT_NAME:build; done',
cwd: path.resolve(__dirname, '../..'),
prefixColor: '#C35831',
prefixColor: '#C72AF7',
env: {}
}, {
name: 'adminX',
command: `nx run-many --projects=${adminXApps} --parallel=${adminXApps.length} --targets=dev`,
cwd: path.resolve(__dirname, '../../apps/admin-x-settings', '../../apps/admin-x-activitypub'),
prefixColor: '#C35831',
prefixColor: '#C72AF7',
env: {}
}];

if (DASH_DASH_ARGS.includes('ghost')) {
commands = [COMMAND_GHOST, COMMAND_TYPESCRIPT];
} else if (DASH_DASH_ARGS.includes('admin')) {
commands = [COMMAND_ADMIN, ...COMMANDS_ADMINX];
} else if (DASH_DASH_ARGS.includes('browser-tests')) {
commands = [COMMAND_BROWSERTESTS, COMMAND_TYPESCRIPT];
} else {
commands = [COMMAND_GHOST, COMMAND_TYPESCRIPT, COMMAND_ADMIN, ...COMMANDS_ADMINX];
}
Expand Down Expand Up @@ -186,7 +196,7 @@ if (DASH_DASH_ARGS.includes('comments') || DASH_DASH_ARGS.includes('all')) {

async function handleStripe() {
if (DASH_DASH_ARGS.includes('stripe') || DASH_DASH_ARGS.includes('all')) {
if (DASH_DASH_ARGS.includes('offline')) {
if (DASH_DASH_ARGS.includes('offline') || DASH_DASH_ARGS.includes('browser-tests')) {
return;
}

Expand Down Expand Up @@ -221,6 +231,10 @@ async function handleStripe() {
process.exit(0);
}

process.env.NX_DISABLE_DB = "true";
await exec("yarn nx reset --onlyDaemon");
await exec("yarn nx daemon --start");

console.log(`Running projects: ${commands.map(c => chalk.green(c.name)).join(', ')}`);

const {result} = concurrently(commands, {
Expand Down
13 changes: 3 additions & 10 deletions .github/scripts/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ services:
volumes:
# Turns out you can drop .sql or .sql.gz files in here, cool!
- ./mysql-preload:/docker-entrypoint-initdb.d
- mysql-data:/var/lib/mysql
healthcheck:
test: "mysql -uroot -proot ghost -e 'select 1'"
interval: 1s
Expand All @@ -27,13 +28,5 @@ services:
ports:
- "6379:6379"
restart: always
jaeger:
image: jaegertracing/all-in-one:1.58
container_name: ghost-jaeger
ports:
- "4318:4318"
- "16686:16686"
- "9411:9411"
restart: always
environment:
COLLECTOR_ZIPKIN_HOST_PORT: :9411
volumes:
mysql-data:
Loading

0 comments on commit 9597c1d

Please sign in to comment.