Skip to content

Commit

Permalink
Deploy Production Code for Commit d5dce9b 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesIves committed Dec 3, 2024
1 parent d5dce9b commit 15de0f0
Show file tree
Hide file tree
Showing 2,646 changed files with 28,356 additions and 164 deletions.
4 changes: 3 additions & 1 deletion lib/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ function deploy(action) {
const temporaryDeploymentBranch = `github-pages-deploy-action/${Math.random()
.toString(36)
.substr(2, 9)}`;
const rsyncVersion = (0, util_1.getRsyncVersion)();
const isMkpathSupported = rsyncVersion >= '3.2.3';
(0, core_1.info)('Starting to commit changes…');
try {
const commitMessage = !(0, util_1.isNullOrUndefined)(action.commitMessage)
Expand Down Expand Up @@ -114,7 +116,7 @@ function deploy(action) {
Pushes all of the build files into the deployment directory.
Allows the user to specify the root if '.' is provided.
rsync is used to prevent file duplication. */
yield (0, execute_1.execute)(`rsync -q -av --checksum --progress ${action.targetFolder ? '--mkpath' : ''} ${action.folderPath}/. ${action.targetFolder
yield (0, execute_1.execute)(`rsync -q -av --checksum --progress ${isMkpathSupported && action.targetFolder ? '--mkpath' : ''} ${action.folderPath}/. ${action.targetFolder
? `${temporaryDeploymentDirectory}/${action.targetFolder}`
: temporaryDeploymentDirectory} ${action.clean
? `--delete ${excludes} ${!fs_1.default.existsSync(`${action.folderPath}/${constants_1.DefaultExcludedFiles.CNAME}`)
Expand Down
4 changes: 4 additions & 0 deletions lib/util.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ export declare const extractErrorMessage: (error: unknown) => string;
* Strips the protocol from a provided URL.
*/
export declare const stripProtocolFromUrl: (url: string) => string;
/**
* Gets the rsync version.
*/
export declare function getRsyncVersion(): string;
16 changes: 16 additions & 0 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.stripProtocolFromUrl = exports.extractErrorMessage = exports.suppressSensitiveInformation = exports.checkParameters = exports.generateFolderPath = exports.generateRepositoryPath = exports.generateTokenType = exports.isNullOrUndefined = void 0;
exports.getRsyncVersion = getRsyncVersion;
const core_1 = require("@actions/core");
const child_process_1 = require("child_process");
const fs_1 = require("fs");
const path_1 = __importDefault(require("path"));
const constants_1 = require("./constants");
Expand Down Expand Up @@ -100,3 +102,17 @@ exports.extractErrorMessage = extractErrorMessage;
*/
const stripProtocolFromUrl = (url) => url.replace(/^(?:https?:\/\/)?(?:www\.)?/i, '').split('/')[0];
exports.stripProtocolFromUrl = stripProtocolFromUrl;
/**
* Gets the rsync version.
*/
function getRsyncVersion() {
try {
const versionOutput = (0, child_process_1.execSync)('rsync --version').toString();
const versionMatch = versionOutput.match(/rsync\s+version\s+(\d+\.\d+\.\d+)/);
return versionMatch ? versionMatch[1] : '';
}
catch (error) {
console.error(error);
return '';
}
}
2 changes: 1 addition & 1 deletion node_modules/.bin/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node_modules/@eslint/js/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 15de0f0

Please sign in to comment.