Skip to content

Instantly share code, notes, and snippets.

@azzgo
Created July 25, 2018 04:29
Show Gist options
  • Save azzgo/cebd3a0646c1bbeb638cebfe52d84208 to your computer and use it in GitHub Desktop.
Save azzgo/cebd3a0646c1bbeb638cebfe52d84208 to your computer and use it in GitHub Desktop.
IBM RTC using lscm.bat commit(Windows) in ci
#!/bin/sh
## ensure git bash is installed on windows
set -e;
echo "clean project";
rm -rf dist.zip dist/;
lscm.bat login -r https://${RPC_REMOTE_URL} -u ${YOUR_USERNAME} -P ${YOUR_PASSWORD} -n ci;
lscm.bat load -r ci --allow -f "${YOUR_WORKSPACE_NAME}";
lscm.bat show status;
# accept incomming change
lscm.bat accept || true;
## change the url to your archive url
curl -O https://jenkins/ws/*zip*/dist.zip;
unzip dist.zip;
echo "Trying to remove www folder";
sh -c "cd ./${PRJECT_DIR}; rm -rf www; mkdir www";
echo "removed";
sh -c "cp -r dist/* .//${PRJECT_DIR}/www";
echo "clean archives";
rm -rf dist.zip dist/;
echo "create new change";
lscm.bat show status;
lscm.bat checkin -i -W ${YOUR_WORK_ITEM_ID} ./${PRJECT_DIR}/www;
lscm.bat deliver;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment