thepopebot 1.2.4 → 1.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38,6 +38,23 @@ function walk(dir) {
38
38
  return files;
39
39
  }
40
40
 
41
+ // Write THEPOPEBOT_VERSION to .env so docker-compose can pin the image tag
42
+ const envPath = path.join(projectRoot, '.env');
43
+ if (fs.existsSync(envPath)) {
44
+ const ownPkgPath = path.join(__dirname, '..', 'package.json');
45
+ try {
46
+ const ownPkg = JSON.parse(fs.readFileSync(ownPkgPath, 'utf8'));
47
+ const version = ownPkg.version;
48
+ let envContent = fs.readFileSync(envPath, 'utf8');
49
+ if (envContent.match(/^THEPOPEBOT_VERSION=.*/m)) {
50
+ envContent = envContent.replace(/^THEPOPEBOT_VERSION=.*/m, `THEPOPEBOT_VERSION=${version}`);
51
+ } else {
52
+ envContent = envContent.trimEnd() + `\nTHEPOPEBOT_VERSION=${version}\n`;
53
+ }
54
+ fs.writeFileSync(envPath, envContent);
55
+ } catch {}
56
+ }
57
+
41
58
  const changed = [];
42
59
  for (const relPath of walk(templatesDir)) {
43
60
  const src = path.join(templatesDir, relPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thepopebot",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "type": "module",
5
5
  "description": "Create autonomous AI agents with a two-layer architecture: Next.js Event Handler + Docker Agent.",
6
6
  "bin": {
@@ -49,6 +49,9 @@ TELEGRAM_CHAT_ID=
49
49
  # If not set, Traefik uses a self-signed certificate
50
50
  # LETSENCRYPT_EMAIL=
51
51
 
52
- # Custom Docker images (optional, defaults to stephengpope/thepopebot-* images)
52
+ # thepopebot version auto-set by postinstall, used by docker-compose for image tags
53
+ # THEPOPEBOT_VERSION=
54
+
55
+ # Custom Docker images (optional, overrides the default stephengpope/thepopebot images)
53
56
  # EVENT_HANDLER_IMAGE_URL=
54
57
  # JOB_IMAGE_URL=
@@ -43,7 +43,7 @@ jobs:
43
43
  if [ -n "$JOB_IMAGE_URL" ]; then
44
44
  IMAGE="${JOB_IMAGE_URL}:latest"
45
45
  else
46
- IMAGE="stephengpope/thepopebot:${THEPOPEBOT_VERSION}"
46
+ IMAGE="stephengpope/thepopebot:job-${THEPOPEBOT_VERSION}"
47
47
  fi
48
48
  echo "Using image: $IMAGE"
49
49
  docker run --rm \
@@ -20,7 +20,7 @@ services:
20
20
  restart: unless-stopped
21
21
 
22
22
  event_handler:
23
- image: ${EVENT_HANDLER_IMAGE_URL:-stephengpope/thepopebot-event-handler:latest}
23
+ image: ${EVENT_HANDLER_IMAGE_URL:-stephengpope/thepopebot:event-handler-${THEPOPEBOT_VERSION:-latest}}
24
24
  volumes:
25
25
  - ./.env:/app/.env
26
26
  - ./config:/app/config