Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Replacing symlinks to 2.1 documentation with real files #4803

Merged
merged 1 commit into from
Jun 27, 2019

Conversation

dshevtsov
Copy link
Collaborator

@dshevtsov dshevtsov commented Jun 21, 2019

Purpose of this pull request

This pull request (PR) replaces content of all symlinks to files guides/v2.1 with content from reference files.

Affected DevDocs pages

  • all files generated from symlinks to files at guides/v2.1

Additional details

The Ruby script that was used to break the symlinks:
break_symlinks.rb:

def given_path
  ARGV[0]
end

def pattern(path)
    File.absolute_path(
      File.join(path, '**', '*')
    )
end

Dir.glob(pattern(given_path)) do |entry|
  realpath = File.realpath(entry)
    if File.symlink?(entry) and realpath.include? 'guides/v2.1'
      `unlink #{entry}`
      `cp #{realpath} #{entry}`
    end
end

The script requires a path to the devdocs directory as an argument. Example:

$ ruby break_symlinks.rb ~/Projects/repos/magento/devdocs

Internal ticket: MAGEDOC-3843

@dshevtsov dshevtsov added Site Improvements Updates to tools, processes, and site architecture that improve reader and contributor experience 2.x labels Jun 21, 2019
@dshevtsov dshevtsov self-assigned this Jun 21, 2019
@dshevtsov
Copy link
Collaborator Author

running tests

Copy link
Contributor

@jeff-matthews jeff-matthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's wait until after tomorrow's release to merge this.

@keharper keharper added the Internal Dev Differentiates work between community and Magento staff label Jun 27, 2019
@dshevtsov dshevtsov force-pushed the ds_rm-2.1-symlinks branch from 8328dd5 to 2946d41 Compare June 27, 2019 20:55
@dshevtsov
Copy link
Collaborator Author

running tests

@dshevtsov dshevtsov requested a review from jeff-matthews June 27, 2019 21:03
@dshevtsov dshevtsov merged commit 26dd055 into master Jun 27, 2019
@ghost
Copy link

ghost commented Jun 27, 2019

Hi @dshevtsov, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@dshevtsov dshevtsov deleted the ds_rm-2.1-symlinks branch June 27, 2019 21:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2.x Internal Dev Differentiates work between community and Magento staff Site Improvements Updates to tools, processes, and site architecture that improve reader and contributor experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants