Compare commits
6 Commits
9ed70b317d
...
8662972fe5
Author | SHA1 | Date | |
---|---|---|---|
8662972fe5 | |||
a566813c56 | |||
7bb56ac14d | |||
e95f5b5ac9 | |||
efe4855297 | |||
1eebfd9717 |
23
Jenkinsfile
vendored
23
Jenkinsfile
vendored
@ -1,10 +1,15 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
stages {
|
stages {
|
||||||
|
stage("clean") {
|
||||||
|
steps {
|
||||||
|
sh 'rm -rf ./dist/*'
|
||||||
|
}
|
||||||
|
}
|
||||||
stage("install") {
|
stage("install") {
|
||||||
steps {
|
steps {
|
||||||
sh 'conda env update --file environment.yml'
|
sh 'mamba env update --file environment.yml'
|
||||||
sh 'echo "conda activate renamebycsv" >> ~/.bashrc'
|
sh 'echo "mamba activate renamebycsv" >> ~/.bashrc'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage("build") {
|
stage("build") {
|
||||||
@ -12,9 +17,19 @@ pipeline {
|
|||||||
sh "python -m build"
|
sh "python -m build"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage("publish") {
|
stage("test") {
|
||||||
|
steps {
|
||||||
|
sh "pip install dist/*.whl"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage("archive") {
|
||||||
|
steps {
|
||||||
|
archiveArtifacts artifacts: 'dist/*.tar.gz, dist/*.whl'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage("publish package") {
|
||||||
when {
|
when {
|
||||||
branch '**/master'
|
branch '**/main'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
withCredentials([usernamePassword(credentialsId: 'rs-git-package-registry-ydeng', passwordVariable: 'PASS', usernameVariable: 'USER')]) {
|
withCredentials([usernamePassword(credentialsId: 'rs-git-package-registry-ydeng', passwordVariable: 'PASS', usernameVariable: 'USER')]) {
|
||||||
|
@ -3,9 +3,8 @@ channels:
|
|||||||
- anaconda
|
- anaconda
|
||||||
- conda-forge
|
- conda-forge
|
||||||
dependencies:
|
dependencies:
|
||||||
- build=0.7.0
|
- build=0.7
|
||||||
- pytest=7.2.2
|
- pytest=7.2
|
||||||
- python=3.11.3
|
- python=3.11
|
||||||
- setuptools=67.6.1
|
- setuptools=67.6
|
||||||
- twine=4.0.2
|
- twine=4.0
|
||||||
- cryptography=38.0.4
|
|
||||||
|
@ -70,6 +70,13 @@ def rename(
|
|||||||
logging.info("No file names were modified.")
|
logging.info("No file names were modified.")
|
||||||
|
|
||||||
|
|
||||||
|
def run(args):
|
||||||
|
candidates = find_all_candidates(args.input_dir, args.regex, args.recursive)
|
||||||
|
rename(
|
||||||
|
args.csv, candidates, args.current, args.become, args.dry, args.keep_extension
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
program_name = "renamebycsv"
|
program_name = "renamebycsv"
|
||||||
argparser = argparse.ArgumentParser(
|
argparser = argparse.ArgumentParser(
|
||||||
@ -135,10 +142,7 @@ def main():
|
|||||||
format="[%(filename)s %(asctime)s - %(levelname)s] %(message)s",
|
format="[%(filename)s %(asctime)s - %(levelname)s] %(message)s",
|
||||||
level=args.verbosity.upper(),
|
level=args.verbosity.upper(),
|
||||||
)
|
)
|
||||||
candidates = find_all_candidates(args.input_dir, args.regex, args.recursive)
|
run(args)
|
||||||
rename(
|
|
||||||
args.csv, candidates, args.current, args.become, args.dry, args.keep_extension
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
Reference in New Issue
Block a user