agrs-sequelize-sdk 1.0.32 → 1.0.34

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.
package/models/Ad.js CHANGED
@@ -72,7 +72,10 @@ module.exports = (sequelize, DataTypes) => {
72
72
  type: DataTypes.STRING,
73
73
  allowNull: true,
74
74
  },
75
-
75
+ publish:{
76
+ type: DataTypes.BOOLEAN,
77
+ allowNull: true,
78
+ },
76
79
  createdTime: {
77
80
  type: DataTypes.DATE,
78
81
  allowNull: true,
@@ -84,7 +87,11 @@ module.exports = (sequelize, DataTypes) => {
84
87
  Draft: {
85
88
  type: DataTypes.BOOLEAN,
86
89
  allowNull: true,
87
- }
90
+ },
91
+ UserCreated: {
92
+ type: DataTypes.STRING,
93
+ allowNull: true,
94
+ },
88
95
  },
89
96
  {
90
97
  tableName: "Ad",
@@ -139,6 +146,27 @@ module.exports = (sequelize, DataTypes) => {
139
146
 
140
147
  return null;
141
148
  };
142
-
149
+ Ad.addHook('beforeUpdate', async (ad, options) => {
150
+ if (ad.changed('publish')) {
151
+ if (ad.previous('publish') === true && ad.publish === false) {
152
+ // Save current state to AdHistory
153
+ await sequelize.models.AdHistory.create({
154
+ AdID: ad.AdID,
155
+ DataSnapshot: ad.get(), // Save the full Ad data as JSON
156
+ });
157
+ } else if (ad.previous('publish') === false && ad.publish === true) {
158
+ // Delete the latest history entry
159
+ const latestHistory = await sequelize.models.AdHistory.findOne({
160
+ where: { AdID: ad.AdID },
161
+ order: [['timestamp', 'DESC']], // Get the latest history entry
162
+ });
163
+
164
+ if (latestHistory) {
165
+ await latestHistory.destroy();
166
+ }
167
+ }
168
+ }
169
+ });
170
+
143
171
  return Ad;
144
172
  };
@@ -45,7 +45,11 @@ module.exports = (sequelize, DataTypes) => {
45
45
  Draft: {
46
46
  type: DataTypes.BOOLEAN,
47
47
  allowNull: true,
48
- }
48
+ },
49
+ UserCreated: {
50
+ type: DataTypes.STRING,
51
+ allowNull: true,
52
+ },
49
53
  });
50
54
 
51
55
  // Define associations
@@ -0,0 +1,30 @@
1
+ module.exports = (sequelize, DataTypes) => {
2
+ const AdHistory = sequelize.define(
3
+ "AdHistory",
4
+ {
5
+ HistoryID: {
6
+ type: DataTypes.UUID,
7
+ defaultValue: DataTypes.UUIDV4,
8
+ primaryKey: true,
9
+ },
10
+ AdID: {
11
+ type: DataTypes.STRING,
12
+ allowNull: false,
13
+ },
14
+ DataSnapshot: {
15
+ type: DataTypes.JSONB, // Store the full Ad row as a JSON object
16
+ allowNull: false,
17
+ },
18
+ timestamp: {
19
+ type: DataTypes.DATE,
20
+ defaultValue: DataTypes.NOW,
21
+ },
22
+ },
23
+ {
24
+ tableName: "AdHistory",
25
+ timestamps: false, // Disable Sequelize timestamps
26
+ }
27
+ );
28
+
29
+ return AdHistory;
30
+ };
package/models/AdSet.js CHANGED
@@ -10,6 +10,10 @@ module.exports = (sequelize, DataTypes) => {
10
10
  type: DataTypes.STRING,
11
11
  allowNull: true,
12
12
  },
13
+ Status: {
14
+ type: DataTypes.STRING,
15
+ allowNull: true,
16
+ },
13
17
  daily_budget: {
14
18
  type: DataTypes.INTEGER,
15
19
  allowNull: true,
@@ -44,6 +48,14 @@ module.exports = (sequelize, DataTypes) => {
44
48
  type: DataTypes.BOOLEAN,
45
49
  allowNull: true,
46
50
  },
51
+ UserCreated: {
52
+ type: DataTypes.STRING,
53
+ allowNull: true,
54
+ },
55
+ publish:{
56
+ type: DataTypes.BOOLEAN,
57
+ allowNull: true,
58
+ },
47
59
  CampaignID: {
48
60
  type: DataTypes.STRING,
49
61
  allowNull: false,
@@ -68,5 +80,27 @@ module.exports = (sequelize, DataTypes) => {
68
80
  AdSet.hasMany(models.Ad, { foreignKey: "AdSetID" });
69
81
  };
70
82
 
83
+ AdSet.addHook('beforeUpdate', async (adSet, options) => {
84
+ if (adSet.changed('publish')) {
85
+ if (adSet.previous('publish') === true && adSet.publish === false) {
86
+ // Save current state to AdSetHistory
87
+ await sequelize.models.AdSetHistory.create({
88
+ AdSetID: adSet.AdSetID,
89
+ DataSnapshot: adSet.get(), // Save the full AdSet data as JSON
90
+ });
91
+ } else if (adSet.previous('publish') === false && adSet.publish === true) {
92
+ // Delete the latest history entry
93
+ const latestHistory = await sequelize.models.AdSetHistory.findOne({
94
+ where: { AdSetID: adSet.AdSetID },
95
+ order: [['timestamp', 'DESC']], // Get the latest history entry
96
+ });
97
+
98
+ if (latestHistory) {
99
+ await latestHistory.destroy();
100
+ }
101
+ }
102
+ }
103
+ });
104
+
71
105
  return AdSet;
72
106
  };
@@ -0,0 +1,30 @@
1
+ module.exports = (sequelize, DataTypes) => {
2
+ const AdSetHistory = sequelize.define(
3
+ "AdSetHistory",
4
+ {
5
+ HistoryID: {
6
+ type: DataTypes.UUID,
7
+ defaultValue: DataTypes.UUIDV4,
8
+ primaryKey: true,
9
+ },
10
+ AdSetID: {
11
+ type: DataTypes.STRING,
12
+ allowNull: false,
13
+ },
14
+ DataSnapshot: {
15
+ type: DataTypes.JSONB, // Store the full AdSet row as a JSON object
16
+ allowNull: false,
17
+ },
18
+ timestamp: {
19
+ type: DataTypes.DATE,
20
+ defaultValue: DataTypes.NOW,
21
+ },
22
+ },
23
+ {
24
+ tableName: "AdSetHistory",
25
+ timestamps: false,
26
+ }
27
+ );
28
+
29
+ return AdSetHistory;
30
+ };
@@ -1,45 +1,3 @@
1
- // module.exports = (sequelize, DataTypes) => {
2
- // const Campaign = sequelize.define(
3
- // "Campaign",
4
- // {
5
- // CampaignID: {
6
- // type: DataTypes.STRING,
7
- // primaryKey: true,
8
- // },
9
- // CampaignName: {
10
- // type: DataTypes.STRING,
11
- // allowNull: true,
12
- // },
13
- // AdAccountID: {
14
- // type: DataTypes.STRING,
15
- // allowNull: false,
16
- // references: {
17
- // model: "AdAccount",
18
- // key: "AdAccountID",
19
- // },
20
- // },
21
- // CreatedTime: {
22
- // type: DataTypes.DATE,
23
- // allowNull: false,
24
- // },
25
- // CampaignDelivery: {
26
- // type: DataTypes.STRING,
27
- // allowNull: false,
28
- // },
29
- // },
30
- // {
31
- // tableName: "Campaign",
32
- // }
33
- // );
34
-
35
- // Campaign.associate = (models) => {
36
- // Campaign.belongsTo(models.AdAccount, { foreignKey: "AdAccountID" });
37
- // Campaign.hasMany(models.AdSet, { foreignKey: "CampaignID" }); // Association to AdSet
38
- // };
39
-
40
- // return Campaign;
41
- // };
42
-
43
1
  module.exports = (sequelize, DataTypes) => {
44
2
  const Campaign = sequelize.define(
45
3
  "Campaign",
@@ -48,7 +6,6 @@ module.exports = (sequelize, DataTypes) => {
48
6
  type: DataTypes.STRING,
49
7
  primaryKey: true,
50
8
  },
51
-
52
9
  CampaignName: {
53
10
  type: DataTypes.STRING,
54
11
  allowNull: true,
@@ -60,18 +17,17 @@ module.exports = (sequelize, DataTypes) => {
60
17
  customEventType: {
61
18
  type: DataTypes.STRING,
62
19
  allowNull: false,
63
- defaultValue: "PURCHASE", // Default value is 'PURCHASE'
20
+ defaultValue: "PURCHASE",
64
21
  },
65
22
  objective: {
66
23
  type: DataTypes.STRING,
67
24
  allowNull: false,
68
- defaultValue: "OUTCOME_SALES", // Default value is 'OUTCOME_SALES'
25
+ defaultValue: "OUTCOME_SALES",
69
26
  },
70
27
  status: {
71
28
  type: DataTypes.STRING,
72
29
  allowNull: true,
73
30
  },
74
-
75
31
  AdAccountID: {
76
32
  type: DataTypes.STRING,
77
33
  allowNull: false,
@@ -95,22 +51,58 @@ module.exports = (sequelize, DataTypes) => {
95
51
  Draft: {
96
52
  type: DataTypes.BOOLEAN,
97
53
  allowNull: true,
98
- }
54
+ },
55
+ publish: {
56
+ type: DataTypes.BOOLEAN,
57
+ allowNull: true,
58
+ },
59
+ UserCreated: {
60
+ type: DataTypes.STRING,
61
+ allowNull: true,
62
+ },
63
+ special_ad_categories: {
64
+ type: DataTypes.ARRAY(DataTypes.STRING),
65
+ allowNull: true,
66
+ },
99
67
  },
100
68
  {
101
69
  tableName: "Campaign",
102
70
  indexes: [
103
71
  {
104
- fields: ["AdAccountID"], // Index on AdAccountID for faster join
72
+ fields: ["AdAccountID"], // Index on AdAccountID for faster joins
105
73
  },
106
74
  ],
107
75
  }
108
76
  );
109
77
 
78
+ // Define associations
110
79
  Campaign.associate = (models) => {
111
80
  Campaign.belongsTo(models.AdAccount, { foreignKey: "AdAccountID" });
112
81
  Campaign.hasMany(models.AdSet, { foreignKey: "CampaignID" });
113
82
  };
114
83
 
84
+ // Combined beforeUpdate hook
85
+ Campaign.addHook('beforeUpdate', async (campaign, options) => {
86
+ if (campaign.changed('publish')) {
87
+ if (campaign.previous('publish') === true && campaign.publish === false) {
88
+ // Save current state to CampaignHistory
89
+ await sequelize.models.CampaignHistory.create({
90
+ CampaignID: campaign.CampaignID,
91
+ DataSnapshot: campaign.get(), // Store current state as JSON
92
+ });
93
+ } else if (campaign.previous('publish') === false && campaign.publish === true) {
94
+ // Delete the latest history entry
95
+ const latestHistory = await sequelize.models.CampaignHistory.findOne({
96
+ where: { CampaignID: campaign.CampaignID },
97
+ order: [['timestamp', 'DESC']], // Get the latest history entry
98
+ });
99
+
100
+ if (latestHistory) {
101
+ await latestHistory.destroy(); // Delete the latest history entry
102
+ }
103
+ }
104
+ }
105
+ });
106
+
115
107
  return Campaign;
116
108
  };
@@ -0,0 +1,33 @@
1
+ module.exports = (sequelize, DataTypes) => {
2
+ const CampaignHistory = sequelize.define(
3
+ "CampaignHistory",
4
+ {
5
+ HistoryID: {
6
+ type: DataTypes.UUID,
7
+ defaultValue: DataTypes.UUIDV4,
8
+ primaryKey: true,
9
+ },
10
+ CampaignID: {
11
+ type: DataTypes.STRING,
12
+ allowNull: false,
13
+ },
14
+ TableName: {
15
+ type: DataTypes.STRING, // Useful for multi-table history tracking
16
+ defaultValue: "Campaign",
17
+ },
18
+ DataSnapshot: {
19
+ type: DataTypes.JSONB, // Store the entire row as JSON
20
+ allowNull: false,
21
+ },
22
+ timestamp: {
23
+ type: DataTypes.DATE,
24
+ defaultValue: DataTypes.NOW,
25
+ },
26
+ },
27
+ {
28
+ tableName: "CampaignHistory",
29
+ }
30
+ );
31
+
32
+ return CampaignHistory;
33
+ };
package/package.json CHANGED
@@ -1,19 +1,21 @@
1
- {
2
- "name": "agrs-sequelize-sdk",
3
- "version": "1.0.32",
4
- "main": "index.js",
5
- "scripts": {
6
- "start": "node index.js",
7
- "sync": "node services/sequelizeService.js",
8
- "test": "echo \"Error: no test specified\" && exit 1"
9
- },
10
- "keywords": [],
11
- "author": "",
12
- "license": "ISC",
13
- "description": "",
14
- "dependencies": {
15
- "pg": "^8.13.0",
16
- "pg-hstore": "^2.3.4",
17
- "sequelize": "^6.37.4"
18
- }
19
- }
1
+ {
2
+ "name": "agrs-sequelize-sdk",
3
+ "version": "1.0.34",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "start": "node index.js",
7
+ "sync": "node services/sequelizeService.js",
8
+ "test": "echo \"Error: no test specified\" \u0026\u0026 exit 1"
9
+ },
10
+ "keywords": [
11
+
12
+ ],
13
+ "author": "",
14
+ "license": "ISC",
15
+ "description": "",
16
+ "dependencies": {
17
+ "pg": "^8.13.0",
18
+ "pg-hstore": "^2.3.4",
19
+ "sequelize": "^6.37.4"
20
+ }
21
+ }
package/run.sh CHANGED
@@ -1,91 +1,214 @@
1
- #!/bin/bash
2
-
3
- # Check if root is only required for jq installation
4
- require_root_for_jq=0
5
-
6
- # Check if jq is installed
7
- if ! command -v jq &> /dev/null; then
8
- echo "jq not found. Installing jq..."
9
- require_root_for_jq=1
10
- if command -v apt-get &> /dev/null; then
11
- sudo apt-get update && sudo apt-get install -y jq
12
- elif command -v brew &> /dev/null; then
13
- brew install jq
14
- else
15
- echo "Please install jq manually."
16
- exit 1
17
- fi
18
- fi
19
-
20
- # Only require root if jq installation was needed
21
- if [[ $require_root_for_jq -eq 1 && $EUID -ne 0 ]]; then
22
- echo "This script must be run as root for jq installation. Please use sudo."
23
- exit 1
24
- fi
25
-
26
- # Step 1: Check if logged in to NPM
27
- npmUsername=$(npm whoami 2>&1)
28
- if [[ $npmUsername == *"ERR"* ]]; then
29
- echo "Not logged in. Please log in to NPM."
30
- npm login
31
- if [[ $? -ne 0 ]]; then
32
- echo "NPM login failed. Exiting..."
33
- exit 1
34
- fi
35
- else
36
- echo "Already logged in to NPM as $npmUsername"
37
- fi
38
-
39
- # Step 2: Increment version in package.json
40
- if [[ ! -f package.json ]]; then
41
- echo "package.json not found. Exiting..."
42
- exit 1
43
- fi
44
-
45
- currentVersion=$(jq -r '.version' package.json)
46
-
47
- if [[ -z "$currentVersion" ]]; then
48
- echo "Could not find version in package.json"
49
- exit 1
50
- fi
51
-
52
- # Split version into major, minor, patch
53
- IFS='.' read -r major minor patch <<< "$currentVersion"
54
-
55
- # Increment version numbers with three-digit logic
56
- if [[ $patch -eq 99 ]]; then
57
- patch=0
58
- if [[ $minor -eq 99 ]]; then
59
- minor=0
60
- ((major++))
61
- else
62
- ((minor++))
63
- fi
64
- else
65
- ((patch++))
66
- fi
67
-
68
- newVersion="$major.$minor.$patch"
69
-
70
- # Update the version in package.json while maintaining formatting
71
- jq --arg version "$newVersion" '.version = $version' package.json > tmp.json && mv tmp.json package.json
72
- echo "Version updated from $currentVersion to $newVersion"
73
-
74
- # Step 3: Publish the package to NPM
75
- npm publish
76
- if [[ $? -ne 0 ]]; then
77
- echo "NPM publish failed. Exiting..."
78
- exit 1
79
- fi
80
-
81
- # Step 4: Commit the changes and push to GitHub
82
- git add .
83
- git commit -m "Bump version to $newVersion"
84
- git push origin main
85
-
86
- if [[ $? -ne 0 ]]; then
87
- echo "Failed to push changes to GitHub. Exiting..."
88
- exit 1
89
- fi
90
-
91
- echo "Version $newVersion published and changes pushed to GitHub successfully!"
1
+ # #!/bin/bash
2
+
3
+ # # Check if root is only required for jq installation
4
+ # require_root_for_jq=0
5
+
6
+ # # Check if jq is installed
7
+ # if ! command -v jq &> /dev/null; then
8
+ # echo "jq not found. Installing jq..."
9
+ # require_root_for_jq=1
10
+ # if command -v apt-get &> /dev/null; then
11
+ # sudo apt-get update && sudo apt-get install -y jq
12
+ # elif command -v brew &> /dev/null; then
13
+ # brew install jq
14
+ # else
15
+ # echo "Please install jq manually."
16
+ # exit 1
17
+ # fi
18
+ # fi
19
+
20
+ # # Only require root if jq installation was needed
21
+ # if [[ $require_root_for_jq -eq 1 && $EUID -ne 0 ]]; then
22
+ # echo "This script must be run as root for jq installation. Please use sudo."
23
+ # exit 1
24
+ # fi
25
+
26
+ # # Step 1: Check if logged in to NPM
27
+ # npmUsername=$(npm whoami 2>&1)
28
+ # if [[ $npmUsername == *"ERR"* ]]; then
29
+ # echo "Not logged in. Please log in to NPM."
30
+ # npm login
31
+ # if [[ $? -ne 0 ]]; then
32
+ # echo "NPM login failed. Exiting..."
33
+ # exit 1
34
+ # fi
35
+ # else
36
+ # echo "Already logged in to NPM as $npmUsername"
37
+ # fi
38
+
39
+ # # Step 2: Increment version in package.json
40
+ # if [[ ! -f package.json ]]; then
41
+ # echo "package.json not found. Exiting..."
42
+ # exit 1
43
+ # fi
44
+
45
+ # currentVersion=$(jq -r '.version' package.json)
46
+
47
+ # if [[ -z "$currentVersion" ]]; then
48
+ # echo "Could not find version in package.json"
49
+ # exit 1
50
+ # fi
51
+
52
+ # # Split version into major, minor, patch
53
+ # IFS='.' read -r major minor patch <<< "$currentVersion"
54
+
55
+ # # Increment version numbers with three-digit logic
56
+ # if [[ $patch -eq 99 ]]; then
57
+ # patch=0
58
+ # if [[ $minor -eq 99 ]]; then
59
+ # minor=0
60
+ # ((major++))
61
+ # else
62
+ # ((minor++))
63
+ # fi
64
+ # else
65
+ # ((patch++))
66
+ # fi
67
+
68
+ # newVersion="$major.$minor.$patch"
69
+
70
+ # # Update the version in package.json while maintaining formatting
71
+ # jq --arg version "$newVersion" '.version = $version' package.json > tmp.json && mv tmp.json package.json
72
+ # echo "Version updated from $currentVersion to $newVersion"
73
+
74
+ # # Step 3: Publish the package to NPM
75
+ # npm publish
76
+ # if [[ $? -ne 0 ]]; then
77
+ # echo "NPM publish failed. Exiting..."
78
+ # exit 1
79
+ # fi
80
+
81
+ # # Step 4: Commit the changes and push to GitHub
82
+ # git add .
83
+ # git commit -m "Bump version to $newVersion"
84
+ # git push origin main
85
+
86
+ # if [[ $? -ne 0 ]]; then
87
+ # echo "Failed to push changes to GitHub. Exiting..."
88
+ # exit 1
89
+ # fi
90
+
91
+ # echo "Version $newVersion published and changes pushed to GitHub successfully!"
92
+
93
+
94
+ #!/bin/bash
95
+
96
+ # Check if root is only required for jq installation
97
+ require_root_for_jq=0
98
+
99
+ # Check if jq is installed
100
+ if ! command -v jq &> /dev/null; then
101
+ echo "jq not found. Installing jq..."
102
+ require_root_for_jq=1
103
+ if command -v apt-get &> /dev/null; then
104
+ sudo apt-get update && sudo apt-get install -y jq
105
+ elif command -v brew &> /dev/null; then
106
+ brew install jq
107
+ else
108
+ echo "Please install jq manually."
109
+ exit 1
110
+ fi
111
+ fi
112
+
113
+ # Only require root if jq installation was needed
114
+ if [[ $require_root_for_jq -eq 1 && $EUID -ne 0 ]]; then
115
+ echo "This script must be run as root for jq installation. Please use sudo."
116
+ exit 1
117
+ fi
118
+
119
+ # Step 1: Check if logged in to NPM
120
+ npmUsername=$(npm whoami 2>&1)
121
+ if [[ $npmUsername == *"ERR"* ]]; then
122
+ echo "Not logged in. Please log in to NPM."
123
+ npm login
124
+ if [[ $? -ne 0 ]]; then
125
+ echo "NPM login failed. Exiting..."
126
+ exit 1
127
+ fi
128
+ else
129
+ echo "Already logged in to NPM as $npmUsername"
130
+ fi
131
+
132
+ # Step 2: Check the latest published version from NPM
133
+ packageName=$(jq -r '.name' package.json)
134
+ if [[ -z "$packageName" ]]; then
135
+ echo "Could not find package name in package.json"
136
+ exit 1
137
+ fi
138
+
139
+ latestPublishedVersion=$(npm view "$packageName" version)
140
+ if [[ $? -ne 0 ]]; then
141
+ echo "Failed to fetch the latest published version. Exiting..."
142
+ exit 1
143
+ fi
144
+
145
+ echo "Latest published version on NPM: $latestPublishedVersion"
146
+
147
+ # Step 3: Increment version in package.json
148
+ if [[ ! -f package.json ]]; then
149
+ echo "package.json not found. Exiting..."
150
+ exit 1
151
+ fi
152
+
153
+ currentVersion=$(jq -r '.version' package.json)
154
+
155
+ if [[ -z "$currentVersion" ]]; then
156
+ echo "Could not find version in package.json"
157
+ exit 1
158
+ fi
159
+
160
+ # Split version into major, minor, patch
161
+ IFS='.' read -r major minor patch <<< "$currentVersion"
162
+
163
+ # Increment version numbers with three-digit logic
164
+ if [[ $patch -eq 99 ]]; then
165
+ patch=0
166
+ if [[ $minor -eq 99 ]]; then
167
+ minor=0
168
+ ((major++))
169
+ else
170
+ ((minor++))
171
+ fi
172
+ else
173
+ ((patch++))
174
+ fi
175
+
176
+ newVersion="$major.$minor.$patch"
177
+
178
+ # Ensure the new version is greater than the latest published version
179
+ if [[ "$(printf '%s\n' "$newVersion" "$latestPublishedVersion" | sort -V | tail -1)" != "$newVersion" ]]; then
180
+ echo "Error: New version ($newVersion) is not greater than the latest published version ($latestPublishedVersion)."
181
+ echo "Please manually update the version in package.json or adjust the script logic."
182
+ exit 1
183
+ fi
184
+
185
+ # Update the version in package.json while maintaining formatting
186
+ jq --arg version "$newVersion" '.version = $version' package.json > tmp.json && mv tmp.json package.json
187
+ echo "Version updated from $currentVersion to $newVersion"
188
+
189
+ # Step 4: Publish the package to NPM
190
+ npm publish
191
+ if [[ $? -ne 0 ]]; then
192
+ echo "NPM publish failed. Exiting..."
193
+ exit 1
194
+ fi
195
+
196
+ # Step 5: Commit the changes and push to GitHub
197
+ git add .
198
+ git commit -m "Bump version to $newVersion"
199
+
200
+ # Pull latest changes to ensure there are no conflicts
201
+ git pull origin main --rebase
202
+ if [[ $? -ne 0 ]]; then
203
+ echo "Git pull failed. Please resolve conflicts manually. Exiting..."
204
+ exit 1
205
+ fi
206
+
207
+ # Push changes to remote
208
+ git push origin main
209
+ if [[ $? -ne 0 ]]; then
210
+ echo "Failed to push changes to GitHub. Exiting..."
211
+ exit 1
212
+ fi
213
+
214
+ echo "Version $newVersion published and changes pushed to GitHub successfully!"