Skip to content

Commit

Permalink
Merge branch 'master' into ci/use-zoweRobot-token
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Johnson <[email protected]>
  • Loading branch information
t1m0thyj committed Dec 20, 2023
2 parents acdafd4 + c1d5c04 commit a7c3d0b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 41 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/zowe-cli-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ jobs:
npm pack @zowe/zosmf-for-zowe-sdk@${{ steps.versions.outputs.packages_zosmf-for-zowe-sdk }}
bash ../scripts/repackage_bundle.sh *.tgz
mv zowe-cli-package.zip ../zowe-nodejs-sdk-${{ env.BUNDLE_VERSION }}.zip
bash ../scripts/generate_typedoc.sh ${{ env.BUNDLE_VERSION_SHORT }} \
${{ steps.versions.outputs.packages_imperative }} ${{ steps.versions.outputs.packages_cli }}
bash ../scripts/generate_typedoc.sh ${{ env.BUNDLE_VERSION_SHORT }} ${{ steps.versions.outputs.packages_cli }}
mv zowe-node-sdk-typedoc.zip ../zowe-nodejs-sdk-typedoc-${{ env.BUNDLE_VERSION }}.zip
rm -rf *
Expand Down
29 changes: 7 additions & 22 deletions scripts/generate_typedoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,52 +13,37 @@ set -e

# Define Zowe bundle version and Git branches/tags for Imperative/CLI
# $zoweVersion is used in the typedoc page header
# $imperativeBranch is used to build Imperative doc and link to its Git repo
# $cliBranch is used to build Zowe SDK doc and link to their Git repo
if [[ $1 != "next"* ]]; then
zoweVersion=v$1
if [[ $zoweVersion != *"SNAPSHOT" ]]; then
imperativeBranch=v$2
cliBranch=v$3
cliBranch=v$2
else
imperativeBranch=$(echo "$2" | sed 's/zowe-v2-lts/master/')
cliBranch=$(echo "$3" | sed 's/zowe-v2-lts/master/')
cliBranch=$(echo "$2" | sed 's/zowe-v2-lts/master/')
fi
else
zoweVersion=vNext
imperativeBranch=next
cliBranch=next
fi

mkdir -p node-sdk
cd node-sdk

# Clone Imperative and Zowe CLI repos to get the TypeScript source
git clone -b ${imperativeBranch} --depth 1 https://github.com/zowe/imperative.git
# Clone Zowe CLI repo to get the TypeScript source
git clone -b ${cliBranch} --depth 1 https://github.com/zowe/zowe-cli.git

# Install typedoc along with dependencies and plugins
npm init -y
npm install -D --legacy-peer-deps @types/node typescript@^3.8.0 typedoc@^0.19.0 \
@strictsoftware/typedoc-plugin-monorepo typedoc-plugin-sourcefile-url

# Transform relative URLs to absolute URLs in Imperative and CLI readmes
sed -i "s [(]\(CONTRIBUTING\|LICENSE\) (https://github.com/zowe/imperative/blob/$imperativeBranch/\1 " imperative/README.md
# Transform relative URLs to absolute URLs in CLI readme
sed -i "s \./ https://github.com/zowe/zowe-cli/blob/$cliBranch/ " zowe-cli/README.md
echo -e "[\n]" > sourcefile-map.json

# Create directory structure for Imperative and SDK packages
# Also generate config for typedoc sourcefile-url plugin
mkdir -p node_modules/@zowe/imperative
mv imperative/{packages,README.md} node_modules/@zowe/imperative/
cat > sourcefile-map.json << EOF
[
{
"pattern": "^@zowe/imperative",
"replace": "https://github.com/zowe/imperative/blob/$imperativeBranch"
}
]
EOF

mkdir -p node_modules/@zowe
for pkgDir in zowe-cli/packages/*; do
if [[ $pkgDir != *"cli" ]]; then
pkgName=$(node -p "require('jsonfile').readFileSync('$pkgDir/package.json').name")
Expand Down Expand Up @@ -90,4 +75,4 @@ EOF
npx typedoc ./node_modules/@zowe
TZ=UTC find typedoc/ -exec touch -t 197001010000.00 {} +
TZ=UTC touch -t 197001010000.00 typedoc
TZ=UTC zip -roX ../zowe-node-sdk-typedoc.zip typedoc
TZ=UTC zip -roX ../zowe-node-sdk-typedoc.zip typedoc
34 changes: 17 additions & 17 deletions zowe-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,57 +21,57 @@ packages:
zowe-v1-lts: 1.0.7
next: false
imperative:
zowe-v2-lts: 5.18.2
zowe-v2-lts: 5.19.0
zowe-v1-lts: 4.18.18
next: true
cli-test-utils:
zowe-v2-lts: 7.18.7
zowe-v2-lts: 7.19.0
next: true
secrets-for-zowe-sdk:
zowe-v2-lts: 7.18.6
next: true
core-for-zowe-sdk:
zowe-v2-lts: 7.18.7
zowe-v2-lts: 7.19.0
zowe-v1-lts: 6.40.19
next: true
zos-uss-for-zowe-sdk:
zowe-v2-lts: 7.18.7
zowe-v2-lts: 7.19.0
zowe-v1-lts: 6.40.19
next: true
provisioning-for-zowe-sdk:
zowe-v2-lts: 7.18.7
zowe-v2-lts: 7.19.0
zowe-v1-lts: 6.40.19
next: true
zos-console-for-zowe-sdk:
zowe-v2-lts: 7.18.7
zowe-v2-lts: 7.19.0
zowe-v1-lts: 6.40.19
next: true
zos-files-for-zowe-sdk:
zowe-v2-lts: 7.18.7
zowe-v2-lts: 7.20.0
zowe-v1-lts: 6.40.19
next: true
zos-logs-for-zowe-sdk:
zowe-v2-lts: 7.18.7
zowe-v2-lts: 7.19.0
zowe-v1-lts: 6.40.19
next: true
zosmf-for-zowe-sdk:
zowe-v2-lts: 7.18.7
zowe-v2-lts: 7.19.0
zowe-v1-lts: 6.40.19
next: true
zos-workflows-for-zowe-sdk:
zowe-v2-lts: 7.18.7
zowe-v2-lts: 7.20.0
zowe-v1-lts: 6.40.19
next: true
zos-jobs-for-zowe-sdk:
zowe-v2-lts: 7.18.7
zowe-v2-lts: 7.20.0
zowe-v1-lts: 6.40.19
next: true
zos-tso-for-zowe-sdk:
zowe-v2-lts: 7.18.7
zowe-v2-lts: 7.19.0
zowe-v1-lts: 6.40.19
next: true
cli:
zowe-v2-lts: 7.18.7
zowe-v2-lts: 7.20.1
zowe-v1-lts: 6.40.19
next: true
# CLI plug-ins
Expand All @@ -80,7 +80,7 @@ packages:
zowe-v1-lts: 4.0.8
next: true
db2-for-zowe-cli:
zowe-v2-lts: 5.0.3
zowe-v2-lts: 5.0.5
zowe-v1-lts: 4.1.9
next: true
ims-for-zowe-cli:
Expand All @@ -95,7 +95,7 @@ packages:
zowe-v1-lts: 4.1.12
next: false
zos-ftp-for-zowe-cli:
zowe-v2-lts: 2.1.3
zowe-v2-lts: 2.1.6
zowe-v1-lts: 1.8.8
next: true

Expand All @@ -118,8 +118,8 @@ tags:
version: 1.28.5
rc: 1
zowe-v2-lts:
version: 2.12.0
rc: 1
version: 2.13.0
rc: 2
# next:
# version: 2.0.0
# snapshot: '2022-04-15'

0 comments on commit a7c3d0b

Please sign in to comment.