Skip to content

Commit

Permalink
fix: enable builds on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Phil Adams <[email protected]>
  • Loading branch information
padamstx committed Aug 25, 2023
1 parent ef0347e commit 3cc5a57
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
1 change: 1 addition & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ module.exports = {
singleQuote: true,
printWidth: 100,
quoteProps: 'preserve',
endOfLine: 'auto',
};
32 changes: 30 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,34 @@ already encountered this issue.
For general guidance on contributing to this project, please see
[this link](https://github.com/IBM/ibm-cloud-sdk-common/blob/main/CONTRIBUTING_nodejs.md)

# Prerequisites
The following tools are required in order to build this project:
* Git
Note: on Windows, be sure to configure git's core.autocrlf setting to be `true`` so that git will
automatically checkout files on Windows using the standard Windows line-endings (CR, LF) and will
convert back to Unix line-endings (LF) when you commit changes. To do this, you can run this command in a shell (e.g
Powershell, git-bash, etc.):
```
git config --global core.autocrlf true
```
* Node.js (includes the `node` and `npm` commands) - be sure to install and use a version that is >=
the minimum version supported by the project (see [README.md](README.md)).
You can install Node.js directly on your computer, but it is recommended that you use a
"node version manager" utility to install and use Node.js so that you can easily switch between versions.
This is helpful because this project supports multiple versions of Node.js, and you might also be working in other Node.js
projects that require a different version of Node.js than this project:
* Linux, MacOS: [nvm](https://github.com/nvm-sh/nvm) and [n](https://github.com/tj/n) are popular
node version managers for Linux and MacOS
* Windows: [nvm-windows](https://github.com/coreybutler/nvm-windows) seems to be a popular
node version manager for Windows.
* [Windows only]: The commands configured in `package.json` require the unix `cp` and `rm` commands. If you are using
WSL or Cygwin, these commands should already be available to you. However, if you are using a native Windows shell environment such as Powershell or the traditional Windows Command Prompt, then you'll need to install these commands.
One option is to install the [GnuWin32 coreutils package](https://gnuwin32.sourceforge.net/packages/coreutils.htm).
Windows users might find it more convenient to use
[`Windows Subsystem for Linux (WSL)`](https://learn.microsoft.com/en-us/windows/wsl/about)
or [`Cygwin`](https://www.cygwin.com/) when making contributions to this project.
# Updating an existing service within the SDK
For instructions on updating an existing service within the SDK, please see
[this link](update_service.md)
For instructions on updating an existing service within the SDK, please see [update_service.md](update_service.md)
5 changes: 4 additions & 1 deletion update_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ to your external github.com id. The id linking step will also result in an invit
`github.com/IBM` org. Accept that invitation.
3. If you do not yet have "push" access to the SDK project, contact the project maintainer to request push access
(you must be a member of the github.com/IBM org).
4. Make sure that your installed version of Node is >= the minimum version supported by the SDK project.
4. Make sure that you have installed the [tools required to build the project](CONTRIBUTING.md#prerequisites).
5. To update a service, make sure the following additional tools are installed:
* The [IBM OpenAPI Validator](https://github.com/IBM/openapi-validator)
* The [IBM OpenAPI SDK Generator](github.ibm.com/CloudEngineering/openapi-sdkgen)

## Initial project setup
1. Clone/fork the repo. If you have push access (see above), you can clone the repo directly (no fork).
Expand Down

0 comments on commit 3cc5a57

Please sign in to comment.