Skip to content

semanticist21/updater-using-sftp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

updater-using-sftp

About the project

This project is for updating files from sftp server. It makes update version management easy with a few settings. It is not recommend to use where security is required.

  • It compares local files from sftp server, and then it brings newer files from the server and updates them with local files.
  • You can set file names not to update or exclude from search.
  • It is open-source, free to edit.

Getting Started

Prerequisites

This program was developed in WPF, .Net 6.0 Framwork, sftp client library.

  • This project was built based on .Net 6.0, so .Net 6.0 or higher version is required for use.
  • Supported OS : Windows

Screen Description

kakao2

For a specific usage, see below Usage Section.

  • Auto : it tries to connect sftp server base on info in app.config, and fetch files info from server. If it has any newer file, it begins updating files into local directory. After completion, it tries to run executable file in the combo box.
  • Connect : it tries to connect sftp server base on the info given, and fetch newer files info and list them on the list box.
  • Update : if it has any files in the list box, it begins updating files into the local directory.
  • Run Project : it run executable file in the combo box.
  • Options : open new option popup.
  • Open Local Folder : open local folder directory where the program is refrencing(usually parent tree from the updater folder).
  • Exit : exit the program. It tries to dispose the connection manager.

Usage

First, download the code and then build the project using Visual Studio.

After build, put all updater files into one folder (Debug Or Release). Or download at github release Then, position it within the same parent directory where there are project folders you want to update. For example, if you have 2 project folders to update, you will have 3 folders in the same directory.

  1. .../some directory/Your Project1
  2. .../some directory/Your Project2
  3. .../some directory/Updater Project Folder

Also, you do the same thing for sftp server. Updater folder is not required. Parent directory can be different from the local parent of folders(like, some directory and some server directory).

  1. .../some server directory/Your Project1
  2. .../some server directory/Your Project2

After that, let's start setting options By clicking Options in the menu. Any information written here will be saved to app.config of the updater folder. So you can directly edit the config file. If enough information is not provied for the program, It might cause errors.

kakao1

General Configs

It is essential to fill all options here.

1. Connection

Set connection info here. This project only uses SFTP protocol

  • Ip Address
  • Port
  • User
  • Password

2. Directories

Set server directory, and folder names for search.

  • SFTP server base directory
  • target folder names

the logic is simple. let's continue with the case above, 2 project folders to update. you have the following as..

[ Window local PC ]

  1. C:/some folder/project1
  2. C:/some folder/project2
  3. C:/some folder/updater

the base local directory is automatically set as "C:/some folder/".

[ sftp server ] In the server, you have the following as..

  1. /some server folder/project1
  2. /some server folder/project2

Then, sftp server base directory should be "/some server folder/". Target Folder Names should be "project1;project2"

3. Customs

It is recommed to be disabled, if you have not set any configs yet. before enabling it, you should run Auto command in the menu by yourself.

  • Auto Updtae On Run

Excludes

Options for excludes in the update process.

  • Folder Names Not To Update
  • File Names Not To Update

It excludes files, folders when making update list. for example, you set

  1. Folder Names To Update : "debug;obj"
  2. File Names Not To Update : "project_1.config;app.config"

The Process will ignore all the names in the child tree of the target folders.

These will be all ignored.

  1. /some server folder/project1/.../obj
  2. /some server folder/project1/debug
  3. /some server folder/project1/.../project_1.config
  4. /some server folder/project1/app.config

Run Configs

Set executable files to run when clicked Auto or Run project in the menus. Put only .exe file in the list.

  • File To Execute Directory
  • Selected File Index

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages