forked from ok-oldking/ok-script
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy_pip.ps1
More file actions
30 lines (23 loc) · 880 Bytes
/
deploy_pip.ps1
File metadata and controls
30 lines (23 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Define the paths
$buildDir = "my_build"
$sourceDir = "ok"
# Remove the build directory if it exists
if (Test-Path -Path $buildDir) {
Remove-Item -Path $buildDir -Recurse -Force
Write-Output "Removed existing directory: $buildDir"
}
# Create the build directory
New-Item -Path $buildDir -ItemType "Directory"
Write-Output "Created new directory: $buildDir"
# Copy the contents of the source directory to the build directory
Copy-Item -Path "$sourceDir" -Destination $buildDir -Recurse
Write-Output "Copied contents from $sourceDir to $buildDir"
# Copy additional files
Copy-Item -Path "setup.py" -Destination $buildDir -Recurse
Copy-Item -Path "MANIFEST.in" -Destination $buildDir -Recurse
Copy-Item -Path "README.md" -Destination $buildDir -Recurse
# Change directory to the build directory
cd $buildDir
python setup.py sdist bdist_wheel
twine upload dist/*
cd ..